Page 1 of 1

Date Format

Posted: Fri Aug 08, 2008 9:19 am
by myukassign
Can anybody help me with a function where I can generate the date in this format?

20080729

I have not find any option to get this using oconv iconv.

Please help

Posted: Fri Aug 08, 2008 10:03 am
by gabrielac
Try

Trim(Oconv(iconv( .... ), "DYMD[4,2,2]"), " ", "A")

Regards,
Gaby

Posted: Fri Aug 08, 2008 10:07 am
by chulett
That's certainly one variation. Basically, you need to generate the date in the proper YMD format with any delimiter and then strip the delimiter.

Posted: Fri Aug 08, 2008 4:13 pm
by ray.wurlod

Code: Select all

DIGITS(Oconv(Iconv(....),"DYMD[4,2,2]"))

Posted: Fri Aug 08, 2008 4:14 pm
by chulett
That's certainly one variation. :wink:

Posted: Mon Aug 11, 2008 12:48 am
by myukassign
Wht should i give inside iconv.?

Its not accepting @Date.

please help me

Posted: Mon Aug 11, 2008 1:48 am
by ray.wurlod
@DATE is already in internal format - so you don't need Iconv().

Code: Select all

Oconv(@DATE, "DYMD[4,2,2]":@VM:"MCN")
To pre-empt Craig, "that's certainly one variation".

Posted: Mon Aug 11, 2008 6:51 am
by chulett
:wink: