Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select
Message
De
20/09/2000 10:39:42
 
 
À
20/09/2000 09:50:47
Todd Wolfe
Certified Marketing Services
Kinderhook, New York, États-Unis
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Re: Select
Divers
Thread ID:
00418488
Message ID:
00418522
Vues:
24
>I have a character field in which we store dates (format is 01/01/2000) of a persons visit. I would like to select only those that are no further back then todays date. I am using the getdate() function to determine the day. However I cannot get the results to come back correctly.
>
>
>what i am looking for
>
>select * from mytable where ddate >( getdate() - 6 months)

You might want to try...

select * from mytable where covert(datetime, ddate) > (getdate()-180)

BOb
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform