M
Microsoft
I am getting incosistent / incorrect daynames from my data using the
datename function. I get the correct dayname and months for dates in
September but, incorrect daynames and correct months for dates in august
july etc..
the query i am using is:
SELECT
DATENAME(WEEKDAY,DAY(SaleDate)) AS Dayname,
DATENAME(MONTH(SaleDate)) AS MonthName,
SaleDate
FROM Sales
the results are:
Dayname Month Saledate
----------------------------------------------------------
Saturday August 2003-08-27 00:00:00.000 -
Incorrect (should by Wednesday)
Tuesday September 2003-09-02 00:00:00.000 - Correct
any help would be greatly appreciated
Ozz
datename function. I get the correct dayname and months for dates in
September but, incorrect daynames and correct months for dates in august
july etc..
the query i am using is:
SELECT
DATENAME(WEEKDAY,DAY(SaleDate)) AS Dayname,
DATENAME(MONTH(SaleDate)) AS MonthName,
SaleDate
FROM Sales
the results are:
Dayname Month Saledate
----------------------------------------------------------
Saturday August 2003-08-27 00:00:00.000 -
Incorrect (should by Wednesday)
Tuesday September 2003-09-02 00:00:00.000 - Correct
any help would be greatly appreciated
Ozz