Page 1 of 1

Julian to date format

Posted: Mon Aug 06, 2007 12:03 pm
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

Posted: Mon Aug 06, 2007 1:14 pm
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")