Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BETWEEN() not returning correct results
Message
From
03/06/2008 06:14:20
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01321168
Message ID:
01321239
Views:
13
>Hi Sergey. It is DATETIME() type. Does it need to be handled differently in the BETWEEN() clause?

Think about it! Is the 3rd of June 2008 12:09 PM between 3rd of June 2008 12:00 AM and 3rd of June 2008 12:00 AM? No, it's after midnight, even after noon.

Your not querying a datetime being within a date, the date values are extended with 12 AM, so you would only find if a datetime is exactly midnight of that queried day...

Get it now, why you would add 1 to the end date? It's just so you get a real timespan you will query in.

Bye, Olaf.
Previous
Reply
Map
View

Click here to load this message in the networking platform