Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ANSI SQL Date Calculations against Oracle Rdb data
Message
From
21/07/1999 18:14:11
 
 
To
21/07/1999 15:48:21
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00244314
Message ID:
00244438
Views:
16
>Is it possible to subtract 2 dates in ANSI SQL92 and get a number of days, months, or years? What is the syntax?

Cindy,

I've not been able to locate any kind of documentation about pure ANSI SQL. If you find something, please forward it to me.

Try using DATEDIFF(part, startdate, enddate). I'm not sure if it's specific to SQL Server or not.

WHERE DATEDIFF(year, dDOB, dDischargeDate) > 18

I'm not making any promises...

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform