Re: current-dateTime() - no leading zero(s) before mi
thank you - i`ll try it tomorrow also i can suggest that if sometime leading zero present - then probably here *trailing* zero is missed in milliseconds On Wed, Jun 4, 2008 at 6:57 PM, Colin Adams <colinpauladams@xxxxxxxxxxxxxx> wrote: > Don't use striing(). > Use format-dateTime() (or however it is spelt). > > 2008/6/4 Vyacheslav Sedov <vyacheslav.sedov@xxxxxxxxx>: >> hello, >> >> XQuery is exactly current-dateTime() >> >> for example please check Marklogic output - >> 2008-06-04T18:28:42.043246+04:00 (six digit, zero after dot present) >> >> and also tried this in Saxon - several times >> >> 2008-06-04T18:31:51.8+04:00 (one digit, no leading zeros after dot - bad for me) >> 2008-06-04T18:32:22.545+04:00 (3 digit after dot - most common case - OK for me) >> 2008-06-04T18:33:02.49+04:00 (2 digits, no leading zero - bad for me) >> 2008-06-04T18:33:21.046+04:00 (wow - leading zero is present! - OK too) >> 2008-06-04T18:36:11.74+04:00 (2 digits, no leading zero - bad for me) >> 2008-06-04T18:39:03.09+04:00 (2 digits, one(!) leading zero - still bad for me) >> >> well, in one xslt i calculate timestamp by <xsl:param name="timestamp" >> select="translate(substring(string(current-dateTime()), 1, >> 23), 'T:-.','')"/> >> >> i need 3 digit from milliseconds with leading zeros >> >> how can i avoid this strange effect? >> >> With best wishes, >> Slav
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format