Hi
I did not understand your question completly could you share your code, what your are doing and what error you are getting?
Did you try this below code
this.duration = Duration.ParseFromString("P1Y14D"); // 1 year and 14days
this.result = this.duration.ConvertToDays();
Result: Integer value 379
regards
Sunil