Page 1 of 1

julian to timestamp

Posted: Mon Jun 04, 2007 3:38 pm
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.

Posted: Mon Jun 04, 2007 7:09 pm
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"

Posted: Tue Jun 05, 2007 1:58 am
by ray.wurlod
Julian is an abused term roughly meaning "counted from a particular day zero".

Posted: Tue Jun 05, 2007 9:03 am
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

Posted: Wed Jun 06, 2007 1:11 am
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".

Posted: Wed Jun 06, 2007 12:38 pm
by Ed Purcell
OK, so what should we do if the Julian date comes in as a character string, say, "2007128"?

Posted: Wed Jun 06, 2007 12:49 pm
by DSguru2B
Cast it As Integer using that function in the transformer stage.