get rid of the date format and just add the 30 days to the original and
don't worry about the formating.
Not sure if that will help but I don't think you need the dateformat.
----- Original Message -----
From: "Bosky, Dave" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, November 21, 2000 1:58 PM


> I'm trying to compare the current date to an expire-on date and mark the
ad
> as expired if the datecompare function returns a value gte 0. Everything
> seems
> ok except that it marks every ad as expired regardless of returned value.
>
> <CFLOOP QUERY="GetEntries">
> <CFSET AdWasPlacedOnThisDate = posted_on>
> <CFSET expiration_date = #dateformat(DateAdd('D', 30,
> AdWasPlacedOnThisDate), "DD-MMM-YY")#>
> <CFSET comparison = DateCompare(CurrentDate,expiration_date>
> <CFIF comparison GTE 0>
> <CFQUERY datasource="xxx" DBTYPE="ODBC">
> UPDATE Ads
> SET online_approval = '2'
> WHERE ad_id = ad_id
> </CFQUERY>
> </CFIF>
> </CFLOOP>
>
> Thanks
>
> Dave Bosky
> HTC Web Application Developer
> 843.369.8613
> [EMAIL PROTECTED]
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
>
> Archives: http://www.mail-archive.com/[email protected]/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to