Solved

Try to return day of the week

Posted on 2011-09-14
3
186 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
mySQL Syntax 7 34
SQL Union 20 44
Help writing a query 6 70
xpath sql query 2008 8 41
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
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 …
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

932 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

11 Experts available now in Live!

Get 1:1 Help Now