Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find DOW in SQL Server?
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01687856
Message ID:
01687899
Vues:
32
This message has been marked as the solution to the initial question of the thread.
>>>Hi,
>>>
>>>I want to specify in the SQL Select that Day of the Week in Monday. I know that in VFP it would be the function DOW().
>>>That is, in VFP I would use
>>>
>>>where DOW(date_field) = 2
>>>
>>>What function could I use in SQL Server?
>>>
>>>TIA
>>
>>SET DATEFIRST = 1
>>
>>Check my answer to your previous question.
>
>Something I still do not understand. If you want to make sure that only Mondays are selected with a SQL Select, you would want to include Something in the WHERE expression. How do you use the "SET DATEFIRST .." in the WHERE expression of the SQL Select?

No, SET DATEFIRST is to make sure what day is supposed to be first in the week Monday or any other.
Check DATEPART() function.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform