Date conversion
Posted: Fri Sep 14, 2001 7:59 am
Hi all,
I have to convert internal date (@DATE) in YYYYMMDD. I tried Oconv function in this way:
Ans = Oconv(@DATE, "DYMD[4,2,2]")
but the deault separation character (blank) betwen year month and day, produce the following result:
YYYY MM DD
My rough solution was to replace blanks with ""![Sad :-(](./images/smilies/icon_sad.gif)
Ans = Ereplace(Oconv(@DATE, "DYMD[4,2,2]"), " ", "")
Does exist a better way to obtain this result (ex. a correct format string as Oconv argument)?
Thanks,
Alessio
I have to convert internal date (@DATE) in YYYYMMDD. I tried Oconv function in this way:
Ans = Oconv(@DATE, "DYMD[4,2,2]")
but the deault separation character (blank) betwen year month and day, produce the following result:
YYYY MM DD
My rough solution was to replace blanks with ""
![Sad :-(](./images/smilies/icon_sad.gif)
Ans = Ereplace(Oconv(@DATE, "DYMD[4,2,2]"), " ", "")
Does exist a better way to obtain this result (ex. a correct format string as Oconv argument)?
Thanks,
Alessio