julian to timestamp

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
attu
Participant
Posts: 225
Joined: Sat Oct 23, 2004 8:45 pm
Location: Texas

julian to timestamp

Post by attu »

how to convert 2454282 julian date to timestamp yyyy-mm-dd- 00:00:00
i am using basic transformer and
Oconv(Iconv(InLink.InputColumn, "DYJ"), "D-YMD[4,2,2]"):'00:00:00'.
what kind of julian dates are they 2454275,2454296?
any help is appreciated thanks.
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Post by JoshGeorge »

2454275,2454296.. are modified Julian day number (They start with 24...)

In PX if you use DateFromJulianDay('2454275') you will get "2007-06-23"
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Julian is an abused term roughly meaning "counted from a particular day zero".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
attu
Participant
Posts: 225
Joined: Sat Oct 23, 2004 8:45 pm
Location: Texas

Post by attu »

Thanks Ray and Josh...

The julian date is coming as an integer and the expected result is a timestamp date.
2007-04-22 00:00:00

I would be using Datefromjulianday but the date coming is an integer?
how would i transform that.

Any thoughts
Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The integer that's coming in is the "Julian day" expected by the function. It is the number of days since "day zero".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Ed Purcell
Premium Member
Premium Member
Posts: 23
Joined: Fri Mar 28, 2003 5:41 pm
Location: USA

Post by Ed Purcell »

OK, so what should we do if the Julian date comes in as a character string, say, "2007128"?
EPCCTX
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Cast it As Integer using that function in the transformer stage.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply