How to convert Unix signed (negative) Timestamp to normal DateTime?
book
Article ID: KB0081969
calendar_today
Updated On:
Products
Versions
TIBCO ActiveMatrix BusinessWorks
5.x, 6.x
Description
How can one convert minutes from unix time stamp to date and time in BW. For example, time stamp 1372339860 correspond to Thu, 27 Jun 2013 13:31:00 GMT.
Issue/Introduction
How can one convert minutes from unix time stamp to date and time in BW. For example, time stamp 1372339860 correspond to Thu, 27 Jun 2013 13:31:00 GMT.
Environment
All
Resolution
It is not possible in BW to convert long type timestamp to DataTime directly, but you can achieve this by using java code. You can leverage the advantage of SimpleDateFormat available in 'java.text.SimpleDateFormat' java package.
Please use below code to convert long timestamp to DateTime.