Hi,
FWIW, I did read the doc and searched the forum before posting. If the answer is in here I missed it...
Does DS have an internal timestamp (or what SAS calls a datetime) format?
IOW, if (straight from the doc):
X = Iconv("1997 5 27", "D YMD") X = 10740
and
X = Iconv("02:46:40", "MTS") X = 10000
then could I do (made up syntax and results):
X = Iconv("1997-05-27 02:46:40", "DT YMD MTS") X = 123456789
where X is say the number of seconds since 31Dec1967?
I've looked at some of Ray's Date routines, and it seems that timestamps are always handled as datepart and timepart separately, with no internal representation of a timestamp value.
If there is an internal timestamp format, are there various oconv patterns to reformat the internal representation for output?
Thanks,
Scott
Does DataStage have an internal timestamp format?
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Your understanding is correct. DataStage does not have an internal representation of timestamp in server jobs/DataStage BASIC.
I tend to use a delimited represenation, for example 14788\10360, where the bit to the left of the delimiter character is the date and the bit to the right is the time part. This allows me to have fractional seconds if need be, for example 14788\10360.456
I tend to use a delimited represenation, for example 14788\10360, where the bit to the left of the delimiter character is the date and the bit to the right is the time part. This allows me to have fractional seconds if need be, for example 14788\10360.456
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.
And to address the second part of your question - OCONV is exactly what is used to convert that internal date and time formats to various output formats. Check the BASIC guide found in the help documentation. For Release 7.5 it is listed in the second page of help guides. Appendix C contains a comprehensive overview of the conversion codes you can use with OCONV.
Ray - No mention of Dick Pick's Birthday in your response on the internal date?
Ray - No mention of Dick Pick's Birthday in your response on the internal date?
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: