Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ANSI SQL Date Calculations against Oracle Rdb data
Message
De
21/07/1999 19:21:56
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
 
 
À
21/07/1999 18:14:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00244314
Message ID:
00244456
Vues:
21
>>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

DATEDIFF is a no-go for ANSI SQL.

I have an interesting book where a lot of SQL functions from various platforms are listed, and DATEDIFF is not listed!

(Wayne S. Freeze, SQL Programmers Reference)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform