[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: current-dateTime() - no leading zero(s) before mi

Subject: Re: current-dateTime() - no leading zero(s) before milliseconds
From: "Vyacheslav Sedov" <vyacheslav.sedov@xxxxxxxxx>
Date: Wed, 4 Jun 2008 19:02:17 +0400
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.