Hi folks,

 

I realize this is probably elementary for most of you but I'm not seeing
the solution I need for this. I have 2 dates being passed from a form in
this format 07/10/2008 and I am trying to check to see if these dates
have passed today's date in Coldfusion. Not having much success with it
at this point and any help would be greatly appreciated. I have tried
the following by stripping out everything that's not numeric, but of
course that won't work, but it was a nice exercise in using  replace J
TIA

 

<cfset ThisDate = now()>

<cfset TheDate = DateFormat(ThisDate, 'mm/dd/yyyy') />

<cfset justThisNumber = rereplace(TheDate,"[^[:digit:]]*","","all")>

 

<cfset justThatNumber =
rereplace(form.fromDate,"[^[:digit:]]*","","all")>

 

<cfset justTheOtherNumber =
rereplace(form.toDate,"[^[:digit:]]*","","all")>

 

<cfif justThatNumber LT justThisNumber OR justTheOtherNumber LT
justThisNumber>

<script>

            alert("The from or to date you entered has already passed,
please enter a new date.");

            history.back();

</script>

 <cfelse>

 

Bob



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3740
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to