Link to home
Start Free TrialLog in
Avatar of CMChalcraft
CMChalcraftFlag for United Kingdom of Great Britain and Northern Ireland

asked on

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
Avatar of Lee
Lee
Flag of United Kingdom of Great Britain and Northern Ireland image

Select datename(dw, getdate())
ASKER CERTIFIED SOLUTION
Avatar of Lee
Lee
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CMChalcraft

ASKER

Very good. Thanks for the speedy response.

Regards

Chris C
Hopefully it helped?

Thanks.