What is months-from-duration function in XQuery

In this article i am going to explain about months-from-duration function
  • 1669

months-from-duration Function

The months-from-duration Function returns number of month as a decimal format. It has only one attribute-

  • duration

it have following properties-

  • deterministic

  • context-independent

  • focus-independent

Syntax of  months-from-duration Function


fn:months-from-duration(DurationValue)

DurationValue also consist  one of the fallowing types-

  • xdt:dayTimeDuration
  • xs:duration
  • xdt:yearMonthDuration

Example of months-from-duration Function


fn:months-from-duration(xs:duration("P5Y9M")) and returned value is 9.

Further Readings

You may also want to read these related articles:
Ask Your Question 
 
Got a programming related question? You may want to post your question here
 

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.