I think the number underneath is consistent, but the serialization is 
changing according to the particular time. What about creating the 
timestamp like this?

xs:string(
   (current-dateTime() - xs:dateTime("0001-01-01T00:00:00.0Z"))
     div xs:dayTimeDuration("PT0.000001S")
)

John

On 29/05/13 17:07, Tim wrote:
> Hi Folks,
>
> I am using fn:current-dateTime() to create a unique timestamp for
> creating archive filenames, e.g.,
>
> *let **$dt*:= fn:/current-dateTime/() *cast as **xs:string*
> *return */replace/(/substring/(*$dt*, 1, 22), "[:\-T\.]", "")
>
> To make it truly unique I need to include part of the fraction of a
> second, but I noticed that fn:current-dateTime() does not always  return
> the same number of digits for fractions of a second.  I have seen
> results with a range anywhere from 2 to 6 digits.  Is there a minimum
> amount of digits that will be supplied in the fractions digits?
>
> Thank you!
>
> Tim Meagher

-- 
John Snelson, Lead Engineer                    http://twitter.com/jpcs
MarkLogic Corporation                         http://www.marklogic.com
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to