Solved

Try to return day of the week

Posted on 2011-09-14
3
180 Views
Last Modified: 2012-06-21
I would like to add a column that shows what is the weakday like Mon, Tues, Wed and so on...
based on the date that i have in another colum:
Here is what i have:

TimeStamp                                  Name
2011-06-20 22:59:47.050             KPI-X
2011-06-22 22:59:47.050             KPI-M
2011-06-25 22:59:47.050             KPI-I

So all what i want to do is add another column that shows weather it is Monday or Tues so forth based on TimeStamp date.  thanks for your help      
0
Comment
Question by:karinos57
3 Comments
 
LVL 3

Accepted Solution

by:
anjos earned 500 total points
ID: 36536957
This should do it:

DATENAME(dw, Your_Date_Column)
0
 

Author Closing Comment

by:karinos57
ID: 36537007
thnx
0
 
LVL 42

Expert Comment

by:dqmq
ID: 36537013
alter table Yourtable add DayOfWeek as datename(dw,[timestamp])
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now