Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to get day using current date input
Posted
Updated 21-Jan-16 1:57am
v2

'They hide that in the documentation'.
Have a look at 'Day', 'DayOfWeek', 'DayOfYear' and 'Now' properties of the DateTime Structure[^].
 
Share this answer
 
Comments
F. Xaver 22-Jan-16 3:07am    
haha, 5ed, because I laughed ;)
CPallini 22-Jan-16 3:13am    
Thank you.
That's a 'Led Mike' (a no more active contributor) quote.
http://www.codeproject.com/Members/led-mike
SQL
SELECT DATENAME(dw, GETDATE()) as DayName
 
Share this answer
 
/*If you wanna name of today*/
" string nameofday = DateTime.Now.DayOfWeek.ToString();"

/*If you wanna date of today*/
" string numofday = DateTime.Now.DayOfYear.ToString();"
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900