Page 1 of 1

function for getting the current date

Posted: Mon Aug 18, 2003 4:21 pm
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

Posted: Mon Aug 18, 2003 4:39 pm
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