CMChalcraft
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
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
Select datename(dw, getdate())
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Very good. Thanks for the speedy response.
Regards
Chris C
Regards
Chris C
Hopefully it helped?
Thanks.
Thanks.