Julian to date format

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
scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

Julian to date format

Post by scorpion »

Hi All,

In my jobs i am converting julian format to date format by using below conditions:

DateToString(StringToDate(Left( XXX,8), "%yyyy%mm%dd"), "%yyyy-%mm-%dd")

this code is working fine when my source column 'XXX' is varchar
But it is not working,if my source column is 'integer'.

Can any one suggest me on this.

I wanted to convert integer to date format.
8 is in place of above symbol like ( xxx,8

thanks
Thanx&Regards
scorpion
Luciana
Participant
Posts: 60
Joined: Fri Jun 10, 2005 7:22 am
Location: Brasil

Post by Luciana »

Hi,

I tested both expressions below and they are working fine. Post the error of the log.

DateToString(StringToDate(Left('20070123',8 ), "%yyyy%mm%dd"), "%yyyy-%mm-%dd")
DateToString(StringToDate(Left(in.DateInteger,8 ), "%yyyy%mm%dd"), "%yyyy-%mm-%dd")
Post Reply