<CFSET date1 = DateFormat(Now()-22,"mm/dd
This is not act method in evaluating a time diff
also your SQL
output_login.SentDt > #date1#
also has issues.
First you need to set your vars time now .. and the timediffrence .
<cfset ndate = CreateODBCDateTime(now()) >
<cfset nday = CreateTimeSpan(21, 0, 0, 0)>
<cfset newdate = (ndate + nday )>
<cfif now() gt dateformat(newdate,"dd/mm/
</cfif>
You now have the nessisary vars to use .. both today and 21 days from now -
Main Topics
Browse All Topics





by: sandeep_chhedaPosted on 2003-05-01 at 08:46:25ID: 8436433
HI,
/mm/yyyy") /yyyy")>
Just try this which I have written below if it works fine else let me knwo the database u r using and the default date format of your database.As currently we are having dd/mm/yyyy format but it might be the case the the format can be different.U can also swap the date format and try that.
<CFSET Contactid = ListFirst(GetAuthUser())>
<cfset date2=dateformat(now(),"dd
<CFSET date1 = DateFormat(Now()-22,"dd/mm
<cfquery name="dr" datasource="DR" >
SELECT *
FROM output_login
WHERE output_login.ContactID = #Contactid#
AND output_login between #date1# and #date2#
ORDER BY SentDt, OriginalSource, ManagerTeamVendor, SRNum
</cfquery>
Regards,
Sandeep