What is XQuery dateTime function in XML
In this article, we will discuss about dateTime function in XQuery
dateTime Function
The dateTime function in XQuery converts the arguments to a date and a time. xs:dateTime value representing the year, month, day, hour, minute and second. It contain two arguments-
-
xs:date arguments gives date value and it also contains value of-
- year is an xs:anyAtomicType, returned year value.
- month is an xs:anyAtomicType, returned month value.
- day is an xs:anyAtomicType, returned day value.
-
xs:time arguments time value and it contains value of-
- hour is an xs:anyAtomicType, returned year value.
- minute is an xs:anyAtomicType, returned month value.
- second is an xs:anyAtomicType, returned day value.
Syntax of dateTime function
fn:dateTime(dateValue,timeValue)
|
Example of dateTime Function
fn:dateTime(2012,7,12,20,6,12) is gives 2012-07-12T20:06:12
|
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