gmt data
Moderators: chulett, rschirm, roy
You mean Greenwich Mean Time? Are you asking how to add X hours to a date time to make it local to your standard? Write a DS function, search the forum, there's lots of examples.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Charter Member
- Posts: 560
- Joined: Wed Jul 13, 2005 5:36 am
- Location: Ohio
I suppose you could take your EPOCH value, divide it by 86400 (the number of seconds in a day) to get the whole number of days in the date. The DS BASIC internal date starts at 1 on January 1, 1968. So, you can work out the equation necessary to compute the date value you need. Then, take the number of seconds remaining when dividing your EPOCH by 86400 and turn that into hours, minutes, and seconds and construct your final timestamp value in the forum YYYY-MM-DD HH24:MI:SS.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
No. ICONV and OCONV work on integer days, not seconds. The time conversions don't include date components. You must write a custom function.Krazykoolrohit wrote:use the iconv and oconv functions to convert. check datastage help for usage
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
There are 1900 and 1970 epoch Transforms in the SDK.
DateGenericToDaysSince1900
DateGenericToDaysSince1970
You actually need the reverse of these, to calculate the date that is so many seconds since 1900-01-01 00:00:00
You can convert seconds to days by dividing by 86400. If all you want is the date, use or something similar, depending on your base date.
DateGenericToDaysSince1900
DateGenericToDaysSince1970
You actually need the reverse of these, to calculate the date that is so many seconds since 1900-01-01 00:00:00
You can convert seconds to days by dividing by 86400. If all you want is the date, use
Code: Select all
Oconv(Int(InLink.MyEpoch/86400)-Iconv("1970-01-01","DYMD"),"D-YMD[4,2,2]")
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.