Server Product ColdFusion Server
     Version 4, 5, 1, SP2
     Edition Professional


Has anyone see this?

I am trying to find the firstdayofmonth(date) and then find what
dayofweek(FirstDayofMonth(date)) is.

For example:

<cfset firstday = FirstDayofMonth("12/17/2001")>
<cfset weekday = DayofWeek(firstday)>

<cfoutput>#firstday# #Weekday# </cfoutput>

This will give you:
335 for firstday (12/1/01)
6 for Weekday(11/30/1900)

If you try to do a dateformat(firstday,"mm/dd/yyyy") you get 11/30/1900 .
You don't get an error reporting that you can't do that.  You just get the
wrong answer.

So I think that is a bug with CF 4.5.

Any ideas.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to