I am using a function to check two dates to make sure that an end date comes after a start date. Right now I am trying to call it like this
Expand|Select|Wrap|Line Numbers
- <cfset date_check=check_date(#Form.startDate#,#Form.endDate#)>
- <cfoutput>#date_check#</cfoutput>
- <cfif NOT isDefined("date_check")>
- <li>Please make sure the end date comes after the start date.</li>
- </cfif>
Expand|Select|Wrap|Line Numbers
- <cffunction
- name="check_date"
- return type="boolean">
- <cfargument
- name="start_date"
- type="date"
- required="yes">
- <cfargument
- name="end_date"
- type="date"
- required="yes">
- <cfif start_date lt end_date>
- <cfset return_value=true>
- <cfelse>
- <cfset return_value=false>
- </cfif>
- <cfreturn return_value>
- </cffunction>
Thanks.