• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 35
  • Last Modified:

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
  • 3
1 Solution
Lee SavidgeCommented:
Select datename(dw, getdate())
Lee SavidgeCommented:
If you just wwant the short name, you can return the left 3 chars:

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

Open in new window

CMChalcraftFinance DirectorAuthor Commented:
Very good. Thanks for the speedy response.


Chris C
Lee SavidgeCommented:
Hopefully it helped?

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.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now