Tuesday, March 27, 2012

Convert a Date to a Day of the Week.

Hey, Im pretty sure this is possible, but let me know if it isnt.

I have a table of dates in the format "DD/MM/YYYY", is there a way of converting it to output the day of the week? for example 16/11/2007 would display Friday insted.

Thanks in advance John

selectdatepart(dw,GETDATE())

selectdatename(dw,GETDATE())

|||

Hi u can check out this

select datepart(dw,date_created) from users

select datename(dw,date_created) from users

Thank u

Baba

Please remember to click "Mark as Answer" on this post if it helped you.

|||

Thanks to the both of you, both methods worked amazingly faultlessly. Thanks John

No comments:

Post a Comment