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
Date Format
Moderators: chulett, rschirm, roy
Re: Date Format
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
srikie
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.
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.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I prefer 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.
Code: Select all
Oconv(@DATE, "DYMD[4,2,2]" : @VM : "MCN")
Read the on-line help about "MC" conversions in Oconv.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.