Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remote view datetime filter
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01533628
Message ID:
01533630
Views:
50
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everybody
>I have created a VFP9 view to get data from MS-SQL Server 2005. I want to filter records for a datetime filed. I have written datetime value like {^2011-01-01 00:00:00} but it does not accept. Any idea please. I do not want to use local view after it to make filter.
>
>Regards,


Use DATE() or DATETIME() function to generate the value you want and then use Parameters instead of built-in values:
ldDateTime = DATETIME(2011,1,1)
** or ldDate = DATE(2011,1,1)

SQLEXEC(Handler, "SELECT * FROM YourTable WHERE DateTimeColumn = ?m.ldDateTime","crsCursor")
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform