Hi, I am using Cold Fusion code in a WAP page. I have the following code:
<CFSET bookdate = DateFormat(#url.bookdate#, "dd, mm, yy"
>
<CFSET booktime = TimeFormat(#url.booktime#, "hh, mm,"
>
<cfif #bookdate# GT #EndDate#>
<b>Error!</b><br/>
Booking Date: Season ends 30/09/01
</cfif>
<cfif #bookdate# LT #StartDate#>
<b>Error!</b><br/>
Booking Date: Season Starts 01/03/01
</cfif>
<cfif #booktime# GT #EndTime#>
<b>Error!</b><br/>
Booking Time: End Time 20.00
</cfif>
<cfif #booktime# LT #StartTime#>
<b>Error!</b><br/>
Booking Time: Start Time 08.00
</cfif>
</CFOUTPUT>
The dates and times being tested test what the user has entered in a previous form to what is held within a database. The dates work fine however the times do not. Whatever time I enter I get the error Booking Time: Start Time 08.00. If I enter times greater than 08.00 say 09.00 I get the same error but shouldn't.
Any ideas appreciated.
Thanks.
<CFSET bookdate = DateFormat(#url.bookdate#, "dd, mm, yy"
<CFSET booktime = TimeFormat(#url.booktime#, "hh, mm,"
<cfif #bookdate# GT #EndDate#>
<b>Error!</b><br/>
Booking Date: Season ends 30/09/01
</cfif>
<cfif #bookdate# LT #StartDate#>
<b>Error!</b><br/>
Booking Date: Season Starts 01/03/01
</cfif>
<cfif #booktime# GT #EndTime#>
<b>Error!</b><br/>
Booking Time: End Time 20.00
</cfif>
<cfif #booktime# LT #StartTime#>
<b>Error!</b><br/>
Booking Time: Start Time 08.00
</cfif>
</CFOUTPUT>
The dates and times being tested test what the user has entered in a previous form to what is held within a database. The dates work fine however the times do not. Whatever time I enter I get the error Booking Time: Start Time 08.00. If I enter times greater than 08.00 say 09.00 I get the same error but shouldn't.
Any ideas appreciated.
Thanks.