Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Syntax for dates
Message
De
22/08/2006 14:47:18
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Database:
MS SQL Server
Divers
Thread ID:
01147655
Message ID:
01147663
Vues:
15
Hi Chad,

Thanks, initially I had the single quotes around the date time, but got an error about problems converting the character value (or something like that).

I have since found that if I just put:
WHERE edc_dentry = 22/08/2006
I at least get some data (even though the edc_dentry field has a value of 01/01/1900 in it!

Is there some better way of passing a date value to SQL Server that won't have the problem of whether using DMY or MDY or YMD format dates?

>Frank,
>
>You may also need to swap the month and day around.
>
>Chad
>
>
>>Frank,
>>
>>For date literals in SQL Server, put single quotes around your literal value:
>>
>>...WHERE  edc_dentry = '22/08/2006 00:00:00'
>>
>>HTH,
>>Chad
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform