days-from-duration function of XQuery in XML

In this article we will discuss about, how to use days-from-duration function in XQuery
  • 2359

days-from-duration Function

The days-from-duration function returns number of month as an integer form. The attribute of days-from-duration function is-

  • duration

The days-from-duration function contains  following properties-

  • deterministic

  • context-independent

  • focus-independent

Syntax of days-from-duration Function


fn:days-from-duration(durationValue)

durationValue also consist  one of the fallowing types-

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

Example of days-from-duration Function


fn:days-from-duration(
xdt:dayTimeDuration("P5DT57H")) and returned value is 5.

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

© 2019 DotNetHeaven. All rights reserved.