Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone...
I'm a new QV user...
and i have a problem wiht a date.
If one of you can help me would be great.
The fact is that I have a Date, which format is something like this
1010224.
the first position is century, next two are year, next two are month and last two day.
I need to convert it to a date format
how i can do it???
thanks...
Angela E
Colombia
On the script, you can use makedate() to create a date based on year, month and day.
The syntax is makedate( Year, Month, Day)
In your case, I didn't understand how to get the Year,
Is your example 24/feb/2001 ?
or 24/feb/0001?
But it would be something like this:
makedate( 2000+( 100* (LEFT( YOUR_DATE_FIELD, 1)-1)) + mid(YOUR_DATE_FIELD,2,2),
mid(YOUR_DATE_FIELD, 4,2), RIGHT( YOUR_DATE_FIELD, 2) )
Sorry if I forgot some ( or )
Hope it helps,
Erich
On the script, you can use makedate() to create a date based on year, month and day.
The syntax is makedate( Year, Month, Day)
In your case, I didn't understand how to get the Year,
Is your example 24/feb/2001 ?
or 24/feb/0001?
But it would be something like this:
makedate( 2000+( 100* (LEFT( YOUR_DATE_FIELD, 1)-1)) + mid(YOUR_DATE_FIELD,2,2),
mid(YOUR_DATE_FIELD, 4,2), RIGHT( YOUR_DATE_FIELD, 2) )
Sorry if I forgot some ( or )
Hope it helps,
Erich
Thanks a lot !!!