I want to extract the Actual day, for example Fri for 22/07/2016, from a DateTime field in SQL

I have tried CONVERT and looked at Date and Time Styles in SQL but I cannot see any that will output "DDD" as you can in Excel.


SELECT     call_date AS DateRaised, CONVERT(VARCHAR(30), call_date, 106) AS 'Day',
calltype, CallOutNo,
FROM         dbo.vw_CallsInByDay_01
WHERE     (DATEPART(YEAR, call_date)) = 2016
CMChalcraftFinance DirectorAsked:
Who is Participating?
 
Lee SavidgeConnect With a Mentor Commented:
If you just wwant the short name, you can return the left 3 chars:

select left(datename(dw, getdate()), 3)

Open in new window

0
 
Lee SavidgeCommented:
Select datename(dw, getdate())
0
 
CMChalcraftFinance DirectorAuthor Commented:
Very good. Thanks for the speedy response.

Regards

Chris C
0
 
Lee SavidgeCommented:
Hopefully it helped?

Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.