DayOfWeek function does not seem correct 
Author Message
 DayOfWeek function does not seem correct

Greetings

If wkYear = "03"
and wkMonth = "4"
and wkDay = "29"

and April 29th, 03 is a Tuesday
Then why does the following formula return a 1. I dont see how Tuesday
could be the first day of the week :

dayOfWeek(date(tonumber(wkYear),tonumber(wkMonth),tonumber(wkDay)))

is returning a 1, I would expect a 2

Thanks

Jeff



Sat, 15 Oct 2005 00:17:42 GMT  
 DayOfWeek function does not seem correct
Jeff,

This could be a quirk of your regional settings.  You can set a default to
determine which day SQL Server uses as the first day of the week, e.g.
sunday, monday etc.  You can also overrise this default only for the
duration of a single query.  For more information, look up dayofweek on
books online.

Hope this helps,
Paul


Quote:
> Greetings

> If wkYear = "03"
> and wkMonth = "4"
> and wkDay = "29"

> and April 29th, 03 is a Tuesday
> Then why does the following formula return a 1. I dont see how Tuesday
> could be the first day of the week :

> dayOfWeek(date(tonumber(wkYear),tonumber(wkMonth),tonumber(wkDay)))

> is returning a 1, I would expect a 2

> Thanks

> Jeff



Sat, 15 Oct 2005 00:22:52 GMT  
 DayOfWeek function does not seem correct
if wkYear is really 3 that is probably the problem...it needs to be
2003...also as I recall regional settings don't apply here...the Crystal
week is always sun thru sat


Quote:
> Greetings

> If wkYear = "03"
> and wkMonth = "4"
> and wkDay = "29"

> and April 29th, 03 is a Tuesday
> Then why does the following formula return a 1. I dont see how Tuesday
> could be the first day of the week :

> dayOfWeek(date(tonumber(wkYear),tonumber(wkMonth),tonumber(wkDay)))

> is returning a 1, I would expect a 2

> Thanks

> Jeff



Sun, 16 Oct 2005 00:59:55 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Mid function not returning correct string

2. MSwinsck.ocx does not function correct...

3. Sendkeys not function correct

4. Dblist doesn't seem to work correct

5. DayOfWeek not recognized

6. Can't Seem to Get the Format Correct

7. Refresh/Requery don't seem to work while doing file I/O

8. Win API functions that don't seem to exist in Win32 API

9. InternetAutodial function doesn't seem to work

10. RaiseEvent doesn't seem to work when using AddressOf function

11. Correct function please

12. Application_Remider --- Does not seem to fire?

 

 
Powered by phpBB® Forum Software