Hi,
I have input column as decimal(38,10) value as e.g "0000000000000000000020070123.0000000000" need to convert into timestamp as "2007-01-23 00:00:00"
What function I can use in transformer to convert from decimal to timestamp. Please provide info.
Regards
Gyani
Decimal to Timestamp conversion
Moderators: chulett, rschirm, roy
-
ray.wurlod
- Participant
- Posts: 54595
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Will the portion to the right of the decimal place ever contain the time portion? You need to plan for these contingencies, particularly if you seek to create re-usable components.
Extend the method suggested by DSguruji. Use the Field() function to retrieve all the digits to the right of the decimal place, then the Left() or Right() function as appropriate to yield the correct eight digits before converting to a time using StringToTime() function.
Extend the method suggested by DSguruji. Use the Field() function to retrieve all the digits to the right of the decimal place, then the Left() or Right() function as appropriate to yield the correct eight digits before converting to a time using StringToTime() function.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
