toss in an fn:replace() to strip off the fractional seconds, or you can use 
format-dateTime() on the adjusted time,
but dont have it put a timezone on just concatentate the "Z"
or you can construct the string yourself by extracting out all the values and 
concatenating them or
recreate a dateTime with no fractional seconds.
Lots of ways to skin the cat.


-----------------------------------------------------------------------------
David Lee
Lead Engineer
MarkLogic Corporation
[email protected]
Phone: +1 812-482-5224
Cell:  +1 812-630-7622
www.marklogic.com<http://www.marklogic.com/>


From: [email protected] 
[mailto:[email protected]] On Behalf Of 
[email protected]
Sent: Saturday, May 11, 2013 1:07 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] return current dateTime in UTC format

Ellis,

Thanks, that's close.

fn:adjust-dateTime-to-timezone(current-dateTime(),xs:dayTimeDuration('PT0H'))

returns:
2013-05-11T17:01:18.209498Z

I need this:
2013-05-11T17:01:18Z

Morgan
________________________________
From: "Ellis Pritchard" <[email protected]>
To: "MarkLogic Developer Discussion" <[email protected]>
Sent: Saturday, May 11, 2013 12:21:06 PM
Subject: Re: [MarkLogic Dev General] return current dateTime in UTC format
fn:adjust-dateTime-to-timezone($dateTime,xs:dayTimeDuration('PT0H'))

Ellis.

On 11 May 2013, at 15:52, [email protected]<mailto:[email protected]> 
wrote:
The current-dateTime() function returns the following:

2013-05-11T10:38:45.333548-04:00

I need to have it expressed in UTC (Coordinated Universal Time), with a special 
UTC designator ("Z") like:

1994-11-05T13:15:30Z

How is that done? With format-dateTime()?

Thanks,
Morgan
_______________________________________________

General mailing list
[email protected]<mailto:[email protected]>
http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to