Often we require to change time stamp from one format to another.
Below esql code shows how to convert an incoming data (which is a time stamp in string) into time stamp or String of the desired format.
Declare srcFormat CHARACTER; -- Source (Incoming time stamp format)
Declare targetFormat CHARACTER; -- Target (Expected time stamp format)
DECLARE InTime TIMESTAMP;
SET srcFormat = 'yyyy-MM-dd HH:mm:ss.SSS';
SET targetFormat = 'yyyy-MM-dd''T''HH:mm:ss.SSS';
-- Converting string into time stamp of same format.
SET InTime = cast(InputBody.time as TIMESTAMP FORMAT srcFormat);
-- Converting time stamp to string of target format.
SET OutputRoot.XMLNSC.out.time = cast(InTime as CHARACTER FORMAT targetFormat);
Below esql code shows how to convert an incoming data (which is a time stamp in string) into time stamp or String of the desired format.
Declare srcFormat CHARACTER; -- Source (Incoming time stamp format)
Declare targetFormat CHARACTER; -- Target (Expected time stamp format)
DECLARE InTime TIMESTAMP;
SET srcFormat = 'yyyy-MM-dd HH:mm:ss.SSS';
SET targetFormat = 'yyyy-MM-dd''T''HH:mm:ss.SSS';
-- Converting string into time stamp of same format.
SET InTime = cast(InputBody.time as TIMESTAMP FORMAT srcFormat);
-- Converting time stamp to string of target format.
SET OutputRoot.XMLNSC.out.time = cast(InTime as CHARACTER FORMAT targetFormat);
ALL the explanation is very nice. Could you post all the nodes use and scenario wise explanation could be very use full.
ReplyDeleteThank for providing information..If possible provide latest version (i.e IIB 9.0). It will helpful for all, who is reffering this blog.
ReplyDeleteThanks,
Prabhakar
This comment has been removed by the author.
ReplyDeleteThank you for giving useful information
ReplyDeleteGreat blog you people have maintained there, I totally appreciate the work.Timestamp Convert
ReplyDeleteSuperlative style of writing that every new blogger aspires to have.
ReplyDeleteDecimal Numbers
It’s really amazing that we can record what our visitors do on our site. Thanks for sharing this awesome guide. I’m happy that I came across with your site this article is on point,thanks again and have a great day. Keep update more information..
ReplyDeleteHadoop Training in Chennai
Java Training in Chennai
Hi,
ReplyDeleteIs there anyway to convert the incoming milliseconds into date in esql?
E.g source is a date in form of milliseconds.
This is a nice article here with some useful tips for those who are not used-to comment that frequently. Thanks for this helpful information I agree with all points you have given to us. I will follow all of them.
ReplyDeletebest rpa training in bangalore
rpa training in bangalore
rpa course in bangalore
RPA training in bangalore
rpa training in chennai
rpa online training
Fantastic work! This is the type of information that should follow collective approximately the web. Embarrassment captivating position Google for not positioning this transmit higher! Enlarge taking place greater than and visit my web situate
ReplyDeletePython Online certification training
python Training institute in Chennai
Python training institute in Bangalore
This comment has been removed by the author.
ReplyDelete
ReplyDeleteData Science Training | Data Science Course | Data Science Training in Chennai | Data Science Course in Chennai
Selenium Training in Chennai | Selenium Training | Selenium Training in Velachery | Selenium Training in Tambaram | Selenium Training Institute in Chennai | Selenium Training Centers in Chennai | Selenium Courses in Chennai | Selenium Courses | Selenium Course Fees | Selenium Course Fees in Chennai | Selenium Course Online
Best Catering Services in Chennai | Best Catering Services Chennai | Best Catering Services
ReplyDeleteGood blog
ReplyDelete