System Date format - 2009-01-06-12.00.00.000000

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
sujaoschin
Premium Member
Premium Member
Posts: 102
Joined: Tue Jan 31, 2006 4:13 am

System Date format - 2009-01-06-12.00.00.000000

Post 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?
Sujatha K
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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"
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
MarkB
Premium Member
Premium Member
Posts: 95
Joined: Fri Oct 27, 2006 9:13 am

Post 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.
sujaoschin
Premium Member
Premium Member
Posts: 102
Joined: Tue Jan 31, 2006 4:13 am

Post 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.
Sujatha K
Post Reply