Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I convert a date to a strictdate
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00329655
Message ID:
00330079
Vues:
20
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform