Define XQuery seconds-from-duration function in XML

In this article, we will go to explain about XQuery seconds-from-duration function
  • 1776

seconds-from-duration Function

The seconds-from-duration Function calculates seconds in a duration. It has a argument:

  • duration

It have fallowing properties- 

  • deterministic

  • context-independent

  • focus-independent

Syntax of seconds-from-duration Function

fn:seconds-from-duration(DurationValue)

DurationValue also consist  one of the fallowing types-

  • xdt:dayTimeDuration
  • xs:duration
  • xdt:yearMonthDuration
Example of seconds-from-duration Function
 

fn:seconds-from-duration(xdt:dayTimeDuration("PT12.5S")) returnd 12.5 seconds.

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.