Dates Comparision in Coldfusion
Hi,
I have a problem with the date comparision in coldfusion code. I have followed the following technique for date comparision:
use <cfset> tag to change all the date values to one format:
<cfset date1 = #CreateODBCDate(FORM.StartDate)#>
<cfset date2 = #CreateODBCDate(FORM.EndDate)#>
<cfset date = #CreateODBCDate(xx.enterdate)#>
Then i have done the comparion in <cfif> tag to return all the data in the database matching the criteria:
<cfif (#DateCompare(date,date1)# NEQ -1) AND (#DateCompare(date,date2)# NEQ 1)>
Dates in between date1 and date2 should be returned.
I am not getting an error message but, my output is not correct. Please help.
Vijayvijay77.
