>- see footer for list info -< Actually if you look, the first date is being converted correctly to 31st October, but the second is becoming the 11th of Feb instead of the 2nd of Nov. Odd, but a consistent problem as far back as I can remember. The only reasoning that seems to fit is that 31/10 could not be anything other than a UK date format, so CF rightly translates to 31st October, whereas 02/11 *could* be a US date format (they do mm/dd/yyyy), and so translates to Feb 11th.
You'll need to use LSDate... functions, or parse the date from the form yourself. Cheers Robin -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Swingewood Sent: 20 October 2005 09:52 To: [email protected] Subject: [CF-Dev] more date problems >- see footer for list info -< This one just doesn't make sense ..... I have a start and an end date .... I compare the two to see if the end is before the start. It just doesn't work ..... <!--- This is what comes from the form ---> <cfset FormStartDate = "31/10/2005"> <cfset FormEndDate = "02/11/2005"> <!--- Now convert this to actual ODBC dates ---> <cfset NEwstartdate = CreateODBCDateTime(FormStartDate)> <cfset Newenddate = CreateODBCDateTime(FormEndDate)> <!--- If the End is befoe the start then its an error ---> <cfif DateCompare(NewEndDate, NewStartDate) EQ -1> <cfoutput> Error <br> Start = #NewStartDate#<br> End = #NewEndDate# </cfoutput> </cfif> <cfabort> This is crazy the 2 dates are displayed correctly and are in ODBC format. Anyone tell me whats going on here please ...? Regards - Paul _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:- >- Hosting provided by www.cfmxhosting.co.uk -< >- Forum provided by www.fusetalk.com -< >- DHTML Menus provided by www.APYCOM.com -< >- Lists hosted by www.Gradwell.com -< >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -< _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:- >- Hosting provided by www.cfmxhosting.co.uk -< >- Forum provided by www.fusetalk.com -< >- DHTML Menus provided by www.APYCOM.com -< >- Lists hosted by www.Gradwell.com -< >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
