.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

WEEKDAY Different on Different PC's

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :Sql Server
DATEPART(dy,20100920) Returns 1 on some PC's and 2 on Others

View Complete Post

More Related Resource Links

Sorting on weekday

I have stored my dates in the format mm/dd/yyyy i want to sort them on weekday starting from Saturday I tried setting the set datefirst but no difference can anyone help as i have also changed the setting to mdy with set dateformat command does that cause a problem and hence datefirst has no effect   Pls help THanks in advance................... Michelle

How to Correlate Last weekday of previous Month and First Weekday of current Month ? - T-SQL 2005

Hi friends, below is my detail description. I woulld like to show busines users Previous Months Last Weekday in Drop Down List as a Parameter. Now, if they select Previous Months Last Weekday, then i need to pass First weekday of Current month. How can i correlate this things ? if you need more information, let me know.   Thanks.

Calculated field for weekday not correct


We use a calendar on Sharpeoint to track events. These events can be all day events that may start at 12:00 am on Thursday and go until 11:59 pm on Friday. I put in a calculated field based on start time so it displays the day of week the event starts along with start time of the event in a list.
This is the calculation I'm using =TEXT(WEEKDAY(([Start Time])),"ddd") It works great if the start time is after 12:01 am. If it is 12:00 am, it displays the day prior. For example Start time of 9/17/10 at 12:00 am will display the day as Thursday.

Anyone know how to correct this?


Please help. I need to create the element name by the value in that column (weekday) - FOR XML AUTO


 I need to create the element name by the value in that column (weekday).

I have query



if (OBJECT_ID ('tempdb..#dayWeek') is not null ) DROP TABLE #dayWeek;



([id] numeric(1), [name] varchar(15));


INSERT INTO #dayWeek ([id],[name]) VALUES (0, 'Monday');

INSERT INTO #dayWeek ([id],[name]) VALUES (1, 'Tuesday');

INSERT INTO #dayWeek ([id],[name]) VALUES (2, 'Wednesday');

INSERT INTO #dayWeek ([id],[name]) VALUES (3, 'Thustday');

INSERT INTO #dayWeek ([id],[name]) VALUES (4, 'Friday');

INSERT INTO #dayWeek ([id],[name]) VALUES (5, 'Saturday');

INSERT INTO #dayWeek ([id],[name]) VALUES (6, 'Sunday');


SELECT * FROM #dayWeek as day




which generates XML ...



<day id="0" name="Monday" />

<day id="1" name="Tuesday" />

<day id="2" name="Wednesday" />

<day id="3" name="Thustday" />

<day id="4" name="Friday" />

<day id="5" name="Saturday" />

<day id="6" name="Sunday" />


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend