Solved

Try to return day of the week

Posted on 2011-09-14
3
198 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

717 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