Ian pointed you in the right direction, "dateAdd()"
<cfparam name="application.startFacTime" default = "#Dateformat(dateAdd('h',
4, now()))#" />

On Thu, Mar 6, 2008 at 3:09 PM, Joy Holman <[EMAIL PROTECTED]> wrote:

> Thanks for your responses.
> I've actually been working with the Date and Time functions in CF.
> I can't seem to get any code to work that adds 4 hours to the variable.
>
> For instance:
> 1.)<CFIF....
> IsDefined("application.startFacTime") AND (
>                        
> DateCompare(DateFormat(application.startFacTime),DateFormat(now()))
> is 0 AND DateCompare(Hour(application.startFacTimeMin),Hour(now())) is -1>
>
> This works to compare the variable to Now, but that doesn't do any good.
>
> I need something like this pseudo-code:
>
> DateCompare(Hour(application.startFacTimeMin)+4 hours,Hour(now())) is -1
>
>
>
> 2.) This "works" but, like above, it doesn't do me any good:
> <CFIF....
>        DateCompare(application.startFacTime,DateFormat(now())) is 0 AND
>   #Abs(DateDiff('h', application.startFacTime, Dateformat(now())))# lt 1
> </cfif>
>
> I need something like this pseudo-code:
> #Abs(DateDiff('h', application.startFacTime + 4 hours,
> Dateformat(now())))# lt 1
>
> Thanks for your help.
>
>
>
> 

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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300669
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to