Page 1 of 1
Date Format
Posted: Tue Mar 01, 2005 11:31 am
by naren6876
Hi,
I need a date format like : YYYYMMDD,.
But when iam writing Oconv(@DATE,"DYMD[4,2,2]") IT GIVES THE OUTPUT LIKE YYYY/MM/DD.
How do i get the result in YYYYMMDD format.
Any help would be appreciate
Naren
Re: Date Format
Posted: Tue Mar 01, 2005 11:35 am
by srikie
I am not sure abt oconv() but one suggestion is extract 'yyyy','mm','dd' and concatenate. I am sure there is much a better way to do this but this was just a quick thought.
srikie
Posted: Tue Mar 01, 2005 11:35 am
by ArndW
Naren,
I posted the exact same question earlier today, see the thread at
viewtopic.php?t=91533
I posted one answer, but hopefully there will be others.
Posted: Tue Mar 01, 2005 3:07 pm
by ray.wurlod
I prefer
Code: Select all
Oconv(@DATE, "DYMD[4,2,2]" : @VM : "MCN")
The first piece is the date conversion, while an "MCN" conversion keeps only the numeric characters.
Read the on-line help about "MC" conversions in Oconv.