Page 1 of 1

Date to gregorian Format

Posted: Wed Sep 29, 2010 12:40 am
by ravireddy25
HI,
I have to convert Date format to Gregorian format, can any one suggest me how to do this, i searched but i didnt get the answers
Any suggestion is appreciated,

Thanks
Ravi

Re: Date to gregorian Format

Posted: Wed Sep 29, 2010 1:03 am
by ravireddy25
ravireddy25 wrote:HI,
I have to convert Date format to Gregorian format, can any one suggest me how to do this, i searched but i didnt get the answers
Any suggestion is appreciated,

Thanks
Ravi
Hi,
I want the calender date to gregorian date
Ex:2005-08-15 to 38578

Thanks in Advance

Posted: Wed Sep 29, 2010 1:37 am
by ray.wurlod
You need to know the "day zero" for your particular date format. The default is 1967-12-31. Iconv(InLink.TheDate, "DYMD") will convert into what you've called a Gregorian date with 1967-12-31 converting to 0.

If this is not your day zero, simply take the Iconv() of your day zero and perform simple arithmetic to use your base date.

Look at some of the supplied Transforms that use a base date of 1970-01-01.

This reply assumes you are using a server job (as marked).