- see footer for list info -<
Hi,
i use
<cfset FormStartDate = "31/10/2005">
<cfset FormEndDate = "02/11/2005">
<cfset startdate = CreateDate(right(FormStartDate,4),mid(FormStartDate,4,2),left(FormStartDate,2))/>
createdate(year,month,day)
and so for the other and all is fine
regards
salvatore
----- Original Message ----- From: "Paul Swingewood" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, October 20, 2005 10:52 AM
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 -<

__________ Informazione NOD32 1.1261 (20051019) __________

Questo messaggio  รจ stato controllato dal Sistema Antivirus NOD32
http://www.nod32.it



_______________________________________________

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 -<

Reply via email to