I have a parameter like abc2010_0428. I have to take last 9 digits and convert them in a meaning ful date like 04/28/2010(mm/dd/yyyy).
I used Right function to extrcat last 9 digits. Now how can I convert this in meaningful date?
Any help will be appreciated.
Thanks!
Conversion into meaningful date
Moderators: chulett, rschirm, roy
Something like this:
Code: Select all
OConv(IConv(Convert("_","",YourDate),"DYMD"),"D/MDY[2,2,4]")
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Thanks. Only Iconv did the trick.
chulett wrote:Something like this:
...Code: Select all
OConv(IConv(Convert("_","",YourDate),"DYMD"),"D/MDY[2,2,4]")
If you say so.
Iconv converts the date into an internal format, which is an integer value representing the number of days past the zero date. You really need OConv to get it back to the valid external format that your post shows - unless your target is a database column. Some will accept that internal format.
Iconv converts the date into an internal format, which is an integer value representing the number of days past the zero date. You really need OConv to get it back to the valid external format that your post shows - unless your target is a database column. Some will accept that internal format.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Yes my target is database column perhaps why it accepted.
My understanding was the same that Iconv converts into internal format but it seems my target accepted it. I did not use Oconv.
My understanding was the same that Iconv converts into internal format but it seems my target accepted it. I did not use Oconv.
chulett wrote: If you say so.
Iconv converts the date into an internal format, which is an integer value representing the number of days past the zero date. You really need OConv to get it back to the valid external format that your post shows - unless your target is a database column. Some will accept that internal format.