Timestamp to string in modify stage
Moderators: chulett, rschirm, roy
Timestamp to string in modify stage
How can i change timestamp field into string and string to timestamp?
give me example on that.
specification property.
Thanks to all guys to sharing your ideas in DSXchange.
give me example on that.
specification property.
Thanks to all guys to sharing your ideas in DSXchange.
-
- Premium Member
- Posts: 108
- Joined: Sat Feb 05, 2005 6:52 pm
- Location: US
search the forum, here are some samples:
string_from_timestamp (timestamp, string)
timestamp_from_string (string, timestamp)
timestamp_from_ustring (ustring, timestamp)
ustring_from_timestamp (timestamp, ustring)
string_from_timestamp (timestamp, string)
timestamp_from_string (string, timestamp)
timestamp_from_ustring (ustring, timestamp)
ustring_from_timestamp (timestamp, ustring)
Every great mistake has a halfway moment, a split second when it can be recalled and perhaps remedied.
Same thing can also be done in a px transformer. StringToTimestamp() and TimestampToString() functions, I believe, in the transformer. You can find the complete list under Transforms, under Type Conversion when you right click on the extended derivation window.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
In the Modify stage the format string is given in square brackets, the input argument (field name) is given in parentheses. For example
Note that minutes are specified as %nn, not %mm.
Code: Select all
string_from_timestamp[%yyyy-%mm-%dd %hh:%nn:%ss](MyTimestamp)
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.
I am not able to see the code
can you please type only the code?
can you please type only the code?
ray.wurlod wrote:In the Modify stage the format string is given in square brackets, the input argument (field name) is given in parentheses. For exampleCode: Select all
string_from_timestamp[%yyyy-%mm-%dd %hh:%nn: ...[/quote]
-
- Charter Member
- Posts: 822
- Joined: Sat Sep 17, 2005 5:25 pm
- Location: USA
here i am littile bit confusion wtih (timestamp)
string_from_timestamp[timestamp_format] (timestamp)
string_from_timestamp[%yyyy-%mm-%dd %hh:%nn:%ss](DATEFIELD)
Is this above code correct?
string_from_timestamp[timestamp_format] (timestamp)
string_from_timestamp[%yyyy-%mm-%dd %hh:%nn:%ss](DATEFIELD)
Is this above code correct?
us1aslam1us wrote:A clear specification with format is given in Parallel Job Developer's guide, Page 28-10,28-11.
-
- Charter Member
- Posts: 822
- Joined: Sat Sep 17, 2005 5:25 pm
- Location: USA