XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Alicia RobertsSubject: Add characters in Date and Time
Author: Alicia Roberts
Date: 21 Apr 2005 10:21 AM
I'm concatenating two fields (Date and Time) and the output looks like
<eb:Timestamp>20050421100342</eb:Timestamp>. However, I have to add dashes(-) in the date, the letter "T", colons(:), and ".000" in the time. I need the output to look like,
<eb:Timestamp>2005-04-21T10:03:42.000</eb:Timestamp>.

Can you help me achieve this output?

Postnext
(Deleted User) Subject: Add characters in Date and Time
Author: (Deleted User)
Date: 21 Apr 2005 10:37 AM
you need to use concat function and substring function to do it.

something like:

concat(substring(datestr, 1, 4), '-', substring(datestr, 5,2), '-'...).

Posttop
Alicia RobertsSubject: Add characters in Date and Time
Author: Alicia Roberts
Date: 21 Apr 2005 11:11 AM
Thanks so much. I was able to get the output, I needed.

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.