Javatpoint Logo
Javatpoint Logo

XQuery current-date() Function

The XQuery current date function is used to retrieve the current date.

XQuery current-date() Example

Use the following XQuery expression to fetch the current date.


Create a Java based XQuery executor program to read the current-date.xqy, passes it to the XQuery expression processor, and executes the expression. After that the result will be displayed.

Execute XQuery against XML

Put the above both files to a same location. We put them on desktop in a folder name XQuery10. Compile using console. You must have JDK 1.5 or later installed on your computer and classpaths are configured.




java XQueryTester


XQUERY Current date function 1

Here, +5:30 specifies the relative GMT time of the server.

Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA