Modify date_from_julian_date
Moderators: chulett, rschirm, roy
Modify date_from_julian_date
Hi,
I'm trying to convert a uint32 field into a date using a Modify Stage and the fonction date_from_julian_day, but I have no chance: All of my records get a NULL at the output field.
I use :
Outfield=date_from_julian_day(Infield)
At the Infield I have this as data:
55398
55399
55400
55401
55402
...
Can anyone help me?
Thanks
I'm trying to convert a uint32 field into a date using a Modify Stage and the fonction date_from_julian_day, but I have no chance: All of my records get a NULL at the output field.
I use :
Outfield=date_from_julian_day(Infield)
At the Infield I have this as data:
55398
55399
55400
55401
55402
...
Can anyone help me?
Thanks
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
What are you supposed to get from these inputs? On what base date are your allegedly Julian dates based? On what base date is the Julian day used by DataStage based (it's in the manual)? I suspect yours is different.
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.
In a transformer, putting in the derivation:Sainath.Srinivasan wrote:Can you try it in a transformer to get it working. Modify stage uses almost similar arguments but reverse function name. ...
DateFromJulianDay(L_In.Infield)
I get this warning:
"Conversion error calling conversion routine date_from_julian_day data may have been lost"
I can't read whole your post, but I don't get your point. Why is it important to know where the data is coming from?ray.wurlod wrote:What are you supposed to get from these inputs? On what base date are your allegedly Julian dates based? On what base date is the Julian day used by DataStage based (it's in the manual)? I suspect ...
Because the "Julian Date" is not standardized and you posted "55398" as a Julian date but haven't specified what date that is supposed to represent. DataStage PX uses the definition
Parallel Job Developers Guide, p. 62 wrote:A Julian day specifies the date as the number of days from 4713 BCE January 1, 12:00 GMT
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
I supposed Julian Date came from a Calendar for which 0 (or 1, never sure) represents 1960-01-01.ArndW wrote:Because the "Julian Date" is not standardized and you posted "55398" as a Julian date but haven't specified what date that is supposed to represent. DataStage PX uses the definition
[quote="Parallel ...
How am I suppose to specify what date that represents?
Which would mean you would need to apply an offset to your data date in order to get a DataStage Julian date and then you can use the conversion function.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Hey Arnd, what is the zero date for julians in Universe? I seem to remember it is old whats-his-name's birthday but can't for the life of me find it. The OP would need to verify their zero date and then offset (as you mentioned) from the internal zero date for this to work.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Who do you think you are???chulett wrote:You suppose? You need to find out what those dates translate to before anyone takes more time to guess at the proper solution to automate that. ...
A forum is made to provide help, not to provide a way to try to shame people.
I'm trying to figure out how a Datastage fonction works, if you cannot help me go to another post and leave me alone.
Shame? Hardly. I apologize if it came off that way to you, it was more of an attempt to get you to think about what you are posting, to provide enough information so that people can actually help you in a cogent manner rather than have to ask for the details needed to provide that help.
It would be appreciated if you could post your actual resolution to help out future searchers... did you indeed need to offset your zero date to match the one DataStage uses internally?
It would be appreciated if you could post your actual resolution to help out future searchers... did you indeed need to offset your zero date to match the one DataStage uses internally?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Are you sure? When you create a date column with a Column Generator in PX (remember you are at the EE forum) and you don't specify any date, by default Datastage gives you 1960-01-01.ray.wurlod wrote:UniVerse - and therefore DataStage server jobs - use a base date (day 0) of 1967-12-31. ...
But that doesn't correspond to a julian day 0, actually it corresponds to the julian day 2436935.