Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I convert a date to a strictdate
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00329655
Message ID:
00330079
Views:
19
>Because my SELECT statement is going to be constructed from a date in a form. Maybe I should've said that the format of the date in the example that I gave was not static. The format of that date could be in the form DMY MDY or YMD.
>
>Anyway my problem is solved now.
>
>What I did is that I built my SELECT statement with the YEAR MONTH and DAY functions.
>
>'{^' + STR(YEAR(ldDate, 4) + '-' + STR(MONTH(ldDate)) + '-' + STR(DAY(ldDate)) + '}'
>
>
>Don't hesitate to reply if you think that you've go something better.

Uh, Denis, is there something wrong with ldnewdate = DATE(YEAR(ldDate), MONTH(ldDate), DAY(ldDate))? That'll return a compliant date regardless of the SET DATE settings.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform