Hi friends
Can anyone tell me how to convert timestamp to date in transformer stage.
thanks
CONVERSION
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 26
- Joined: Tue Dec 18, 2007 6:31 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Wrong. That function belongs in an SQL query, not in a Transformer stage.
In a Transformer stage simply take the leftmost ten characters, or the first space-delimited field, from the timestamp. This works because there are no data types in server jobs.
If you need an internal format date, apply an Iconv() function to that result.
In a Transformer stage simply take the leftmost ten characters, or the first space-delimited field, from the timestamp. This works because there are no data types in server jobs.
Code: Select all
Left(InLink.TheTimestamp,10)
Field(InLink.TheTimestamp, " ", 1, 1)
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.
conversion
ray.wurlod wrote:Wrong. That function belongs in an SQL query, not in a Transformer stage.
In a Transformer stage simply take the leftmost ten characters, or the first space-delimited field, from the timestamp. T ...
thanks but how do you implement in transformer stage.
-
- Participant
- Posts: 78
- Joined: Fri Mar 02, 2007 4:54 am
- Location: CHENNAI
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
A full and general solution was given in my earlier reply.
Premium membership is worth it. Less than 30c per day. 100% of this goes to the hosting and bandwidth costs incurred by DSXchange.
Premium membership is worth it. Less than 30c per day. 100% of this goes to the hosting and bandwidth costs incurred by DSXchange.
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.