Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date problem
Message
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Title:
Miscellaneous
Thread ID:
00469814
Message ID:
00469825
Views:
27
>Hi everybody,
>
>In our old Legacy tables we store date in a Character format. I'm trying this test in VFP (it doesn't work in FP also):
>
>lcDate=dtoc(date()-10)
>?between(lcDate,"12/01/2000","01/29/2001")
>
>How can I make it work in FPD 2.6, where strict date format was not introduced, I suppose?
>
>Thanks in advance

First of all the order of the characters in the string will cause it to fail. Strings are evaluated from left to right and therefore "12/01" > "01/29".

The following will work
lcdate = DTOS(DATE() - 10)
? BETWEEN(lcdate, "20000112", "20010129")
George

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

Click here to load this message in the networking platform