function for getting the current date

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
dsproj2003
Participant
Posts: 21
Joined: Wed Oct 01, 2003 11:53 am

function for getting the current date

Post by dsproj2003 »

Hi,

I need current dates in different formats vizz

-YYMMDD
-YYYYMMDD

Which are the functions available I can use for this in a transformer.

I am using PX 6.0, DS Designer ver 6.0.0.17.

Any pointers are most welcome.

Thanks in advance.
Regards,
Nitin
spracht
Participant
Posts: 105
Joined: Tue Apr 15, 2003 11:30 pm
Location: Germany

Post by spracht »

Nitin,

up to DS 5.2 you could use:

ereplace(oconv(Date(), "D-YMD[4,2,2]"),'-','')
ereplace(oconv(Date(), "D-YMD[2,2,2]"),'-','')

I think I once tried to get the date formatted without delimiter in one step, but didn't succeed. As this does'nt seem to be possible, I eliminate it using ereplace.




Stephan
Post Reply