it's because you're passing an integer (335) to the dateformat function.
it doesn't recognize that as a valid date, so gives the "default date".

christopher olive, cto, vp of web development
cresco technologies, inc
410.825.0383
http://www.crescotech.com


-----Original Message-----
From: David Brown [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 17, 2001 11:12 AM
To: CF-Talk
Subject: Bug I think


      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.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
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