View Single Post
  #7 (permalink)  
Old June 2nd, 2008, 04:30 PM
mhkay's Avatar
mhkay mhkay is offline
Wrox Author
Points: 18,240, Level: 58
Points: 18,240, Level: 58 Points: 18,240, Level: 58 Points: 18,240, Level: 58
Activity: 50%
Activity: 50% Activity: 50% Activity: 50%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,925
Thanks: 0
Thanked 281 Times in 276 Posts
Default

If it really matters to you to round to the nearest millisecond rather than truncating, try format-dateTime($d,'[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01]:[f001]')

However, it's highly unlikely that the value returned by the system is sufficiently precise that it really makes a meaningful difference whether you round or truncate the value.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote