Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DateTime Comparisons with SQL Server
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00051173
Message ID:
00051316
Views:
32
I don't know SQL-SERVER, but it's probably a difference of storage format. IE the Timestamp field is (probably) not in the same format as a VFP datetime (4 bytes for date, 4 bytes for time). Maybe the timestamp is a number of seconds since 1/1/1970 0:00:00 or something like that?

I don't think there are default conversions between these datetime formats.

Vlad

>How do I compare DATETIME() values in a SQL view?
>
>If I create a view like this:
>
>CREATE SQL VIEW "V_Order2" ;
> REMOTE CONNECT "WAREHOUSE" SHARED AS ;
>SELECT *;
> FROM orders Orders;
> ORDER BY Orders.timestamp ;
> where Orders.timestamp > datetime() - 86000
>
>I get an error for Incorrect syntax. What I want to do is see all
>records for today's date.
>
>I've played around with the SQL date functions, but can't seem to figure
>out a combination that allows me to compare these values. Seems that
>the view doesn't like VFP nor SQL functions on the right of the >.
>
>Any help appreciated...
>
>+++ Rick ---
Previous
Reply
Map
View

Click here to load this message in the networking platform