Page 1 of 1

Date format conversion: YYYY-MM-DD to YYYYMMDD

Posted: Tue Sep 19, 2006 6:59 pm
by durgaps
Hi,

I need to convert a Date input column having format YYYY-MM-DD to output as YYYYMMDD. I tried Oconv(Iconv(DSLink3.date1,"D-YMD"),"DYMD") but the output is coming as YYYY MM DD. How can I achieve my original desired results? I searched through the DS Help but couldnt find a solution for this.

Thanks,

Posted: Tue Sep 19, 2006 7:06 pm
by kumar_s
What is the output datatype. If it is char/varchar, juct Convert '-' to ''

Posted: Tue Sep 19, 2006 10:40 pm
by DSguru2B
or you can use the following code

Code: Select all

Oconv(Iconv(InLink.Date, "DYMD[4,2,2]"), "DYMD[4,2,2]":@VM:"MCN")
OR

Code: Select all

DIGITS(InLink.Date)

Posted: Wed Sep 20, 2006 12:28 am
by Xpert
Hi,

You can use DIGITS(DSLink3.Date), it works fine than Oconv and Iconv conversion.