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
sumoka
Participant
Posts: 12 Joined: Thu Sep 13, 2007 9:21 pm
Post
by sumoka » Thu Nov 11, 2010 7:01 am
Hi ,
if any body has a solution please help.
the desired format is YYYY-MM-DD
or any other format will do .
ArndW
Participant
Posts: 16318 Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:
Post
by ArndW » Thu Nov 11, 2010 8:16 am
There is, unfortunately, no single definition or standard for "Julian Date". But DataStage has a function DateFromDaysSince() with which you can take the base date from your Julian and add the number of days to get a DATE value, which you can then format to your specifications. If your julian date happens to be the same as DataStages (which specifies "number of days from 4713 BCE January 1, 12:00 GMT") then you can use the builtin Julian date functions.
sumoka
Participant
Posts: 12 Joined: Thu Sep 13, 2007 9:21 pm
Post
by sumoka » Thu Nov 11, 2010 8:28 am
The i/p is a decimal (5,0) 09134.
I tried teh following code :
DateFromJulianDay(AsInteger(Field(DecimalToString(<ColumnName>,"fix_zero") ,".",1) ))
it gives teh o/p in '*' i.e. junk
ArndW
Participant
Posts: 16318 Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:
Post
by ArndW » Thu Nov 11, 2010 8:51 am
Of course that will give incorrect output. In order to do ANY date work, DataStage (and you) need to know what actual date is represented by "09134" -> is it Febrary 13th, 1242 or December 1st, 2005 or some other date? Once you know that date, then you can use the DateFromDaysSince function.
karrisuresh
Participant
Posts: 57 Joined: Sat Jun 09, 2007 1:14 am
Location: chicago
Post
by karrisuresh » Thu Nov 11, 2010 9:00 am
Hi Can you tell what is ur input and what is the out put u want
if possible quote an example
Hi I have experience in parallel extender datastage I am ready to give/take help from other
hope we all help each other hand in hand
sumoka
Participant
Posts: 12 Joined: Thu Sep 13, 2007 9:21 pm
Post
by sumoka » Thu Nov 11, 2010 9:11 am
Hi ,
The i/p is a decimal (5,0) 09134.
and I don't know the standard date representation.
I understand my limitations here .. if anybody can give a solid hint.. which after a little working on can yield a result it wil be great.
sumoka
Participant
Posts: 12 Joined: Thu Sep 13, 2007 9:21 pm
Post
by sumoka » Thu Nov 11, 2010 9:13 am
Hi ,
The i/p is a decimal (5,0) 09134.
and I don't know the standard date representation.
I understand my limitations here .. if anybody can give a solid hint.. which after a little working on can yield a result it wil be great.
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Thu Nov 11, 2010 9:54 am
Go back to your source, where the data comes from. Ask them what date that value represents. There's no way for us to know.
-craig
"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Thu Nov 11, 2010 3:17 pm
Could 09134 represent the 134th day of 2009? That format is also sometimes referred to as "Julian". And is easily converted.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sumoka
Participant
Posts: 12 Joined: Thu Sep 13, 2007 9:21 pm
Post
by sumoka » Fri Nov 12, 2010 1:00 am
Thanks Ray ,
will assume the representation mentioned by you and work on it.
will share the solution once I get it.
Thanks again.
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Fri Nov 12, 2010 1:50 am
If this is true you can use StringToDate() with an appropriate date format mask string.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dganeshm
Premium Member
Posts: 91 Joined: Tue Aug 11, 2009 3:26 pm
Post
by dganeshm » Mon Feb 14, 2011 2:09 pm
ray.wurlod wrote: If this is true you can use StringToDate() with an appropriate date format mask string. ...
Hi Ray,
I tried using the following format :
StringToDate(DSLink2.flm[12,5],"%yy%(ddd,v)")
but am getting the warning :
Transformer_9,0: Conversion error calling conversion routine date_from_ustring data may have been lost
Regards
Regards,
Ganesh
dganeshm
Premium Member
Posts: 91 Joined: Tue Aug 11, 2009 3:26 pm
Post
by dganeshm » Mon Feb 14, 2011 2:11 pm
ray.wurlod wrote: If this is true you can use StringToDate() with an appropriate date format mask string. ...
Hi Ray,
I tried using the following format :
StringToDate(DSLink2.flm[12,5],"%yy%(ddd,v)")
but am getting the warning :
Transformer_9,0: Conversion error calling conversion routine date_from_ustring data may have been lost
Regards
Regards,
Ganesh
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Mon Feb 14, 2011 3:44 pm
And that only took you three months?!! Amazing! What else have you tried?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dganeshm
Premium Member
Posts: 91 Joined: Tue Aug 11, 2009 3:26 pm
Post
by dganeshm » Mon Feb 14, 2011 4:02 pm
ray.wurlod wrote: And that only took you three months?!! Amazing! What else have you tried? ...
I actually started following this topic today.. trying to figure out what the exact date should look like from the source..
Regards,
Ganesh