[xquery-talk] the least stupid way to just print the current datein xquery

Rademacher, Gunther Gunther.Rademacher at softwareag.com
Fri Dec 2 00:51:46 PST 2011

It would be

    adjust-date-to-timezone(current-date(), ())

See http://www.w3.org/TR/xquery-operators/#func-adjust-date-to-timezone 

Software AG - Group Executive Board: Karl-Heinz Streibich (Vorsitzender/Chairman), Arnd Zinnhardt, Mark Edwards, Dr. Wolfram Jost, Kamyar Niroumand, Darren Roos, Jonathan Smith, Ivo Totev 

Sitz/Registered office: Uhlandstra?e 12, 64297 Darmstadt, Germany - Registergericht/Commercial register: Darmstadt HRB 1562 - Vorstand/Management Board: Karl-Heinz Streibich (Vorsitzender/Chairman), Dr. Wolfram Jost, Arnd Zinnhardt http://www.softwareag.com/
-----Original Message-----

From: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] On
Behalf Of jidanni at jidanni.org
Sent: Freitag, 2. Dezember 2011 08:52
To: talk at x-query.com
Subject: [xquery-talk] the least stupid way to just print the current
datein xquery

Gentlemen, its my "virgin" post to the list. Allow me to test the waters
by asking what's the least stupid way to just print the current date in
xquery? (Without the ugly timezone baggage.) $ basex -q
gives me exactly what I want, but it is rather 'expensive'.
Other solutions involving fn:substring might break in 10000-2011=7989
Yes, something like the opposite of
or something(s) that would NOT just give me
Hmm, fn:substring-before might break if I move to the other side of
Greenwich, as will my tokenize without [+-] erg... Enough. How do you
guys just print the current date?
talk at x-query.com

More information about the talk mailing list