Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP DATE() vs. SQL GETDATE()
Message
 
 
To
21/04/2006 08:48:56
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows NT
Database:
MS SQL Server
Miscellaneous
Thread ID:
01115333
Message ID:
01115334
Views:
15
>In VFP it's easy to reference the last month of data by using DATE()-31 but when I try this with SQL (ver. 6.5) GETDATE()-31, I get an error.
>
>How can you use MS SQL's GETDATE() and subtract (or add) a specific number of days?

Check DATEADD() function.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform