Page 1 of 1

System Date format - 2009-01-06-12.00.00.000000

Posted: Wed Jan 14, 2009 12:18 am
by sujaoschin
I am having a column by name 'changedate' where the current system date has to be populated in the format of 2009-01-14-12.00.00.000000

Where
today's date is 14-01-2009 and
12.00.00.000000 should be appended to the system date.

When I assign @DATE = changedate in transformer stage and generate a sequential file, 14990 is getting populated instead of 14-01-2009. I have used ICONV and OCONV in transformer stage but I am getting the same output of 14990. Please let me know whether I need to write any date function?

Posted: Wed Jan 14, 2009 4:14 am
by ray.wurlod
No, you just need to learn to use Oconv() correctly.

This article explains it thoroughly.

The expression you require is

Code: Select all

Oconv(@DATE,"D-YMD[4,2,2]") : "-12.00.00.000000"

Posted: Wed Jan 14, 2009 4:19 am
by MarkB
This is happening because @DATE is a system variable containing the internal Universe representation of the current date. 14990 is Jan 14, 2009.

Posted: Wed Jan 14, 2009 5:05 pm
by sujaoschin
Thank you so much, Ray.

As you mentioned I used
Oconv(@DATE,"D-YMD[4,2,2]") : "-12.00.00.000000" and I got the correct output.