Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SPT date syntax
Message
 
 
À
28/02/2000 07:45:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00338332
Message ID:
00338339
Vues:
18
In SQL Server, dates are stored as datetimes so if you are looking for a specific date, you either have to specify the entire value (date + time) or convert it into something manageable. The following can be used in your where clause:

WHERE convert(varchar(10),datetime_field,101) like "02/28/2000"

First parameter - type of value to convert to (in this case 10 character string)
Second parameter - field to convert
Third parameter - Style to convert to 1 - American, 2 - ANSI, 3 - British/French
Add 100 to value if you four digit year (as I have done)

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform