Original Message:
> From: Gabriel Robichaud <[EMAIL PROTECTED]>

> Anyone know why this code doesn't return the right day of week?
> <cfset firstDayOfcurrMonth =
> DayOfWeek(FirstDayOfMonth(createdate(url.currYear, url.currMonth,
> url.currday)))>

firstDayOfMonth() returns the actual number of the day in the year that the first day of a month starts on.  For example, February 1st would return 32 (the 32nd day of the year).

I think what you want is:
<cfset firstDayOfcurrMonth = DayOfWeek(createdate(url.currYear, url.currMonth, 1))>

(since no matter what month it is, the first day is ALWAYS a date of "1"  [ X/1/2003 ])

Scott

---------------------------
Scott Brady
http://www.scottbrady.net/


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to