Wilfred, thanks a bunch. I had a little case of tunnel vision with using
DateDiff and just didn't think about using DateAdd. With a slight modification
to my nested IF's, the DateAdd format is working like I had wanted the DateDiff
debacle to work. Thanks again!
> Nick,
>
> Since you want to find the difference between ENDDATE and PENDINGDATE
> and get the difference of that result of the difference between
> ENDDATE and INITIALDATE. I hope I said that right. LOL
>
> You can do something like this.
>
>
> <CFIF COMPLATEDATE NEQ "" AND SIGNEDDATE NEQ "">
> <!--- This creates a date of the ENDDATE plus or minus the difference
> of PENDINGDATE. --->
> <cfset myTempDate = DateAdd("d", DateDiff("d", ENDDATE, PENDINGDATE),
> ENDDATE)>
> #Datediff("d", myTempDate, INITIALDATE)#
> Days </CFIF>
>
> ________________________________
>
> From: Nick G [mailto:[EMAIL PROTECTED]
> Sent: Tue 2/13/2007 6:32 AM
> To: CF-Newbie
> Subject: Re: DateDiff variables
>
>
>
> Hi Chuck, this is part of a table which the user than will be able to
> save in Excel or a PDF file. I am changing the table to indicate how
> much time (in days) it takes for each phase to be completed. There are
> a lot of dates and 12 phases in all. I was trying to create a short
> cut by putting two DateDiff's together which was supposed to help me
> cut out several nested if statements (which is not my strong point).
>
>
>
>
> >DateDiff requires 2 dates. The inside datediff is now no longer a
> date
> >it is an integer of the datepart you specified. So you should be
> >getting an error stating something of that nature.
> >
> >So, what is it that you are trying to do?
> >
> >
> >Chuck Weidler
> >Lockheed Martin Information Technology
> >3108 Lord Baltimore Drive
> >Baltimore, MD 21244
> >Voice: (443) 348-2169
> >Fax: (443) 348-2233
> >Email: [EMAIL PROTECTED]
> >
> >-----Original Message-----
> >From: Nick G [mailto:[EMAIL PROTECTED]
> >Sent: Monday, February 12, 2007 2:05 PM
> >To: CF-Newbie
> >Subject: DateDiff variables
> >
> >Instead of delcaring a variable like this:
> >
> ><CFSET myTime = #DateDiff("d", ENDDATE, PENDINGDATE)#>
> >
> >I have been trying to put a datediff inside a datediff..see below.
> >
> ><CFIF COMPLATEDATE NEQ "" AND SIGNEDDATE NEQ "">
> > #Datediff("d", #DateDiff("d", ENDDATE, PENDINGDATE)#,
> INITIALDATE)#
> >Days </CFIF>
> >
> >
> >....is this possible or should I just use the myTime variable
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU
Archive:
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2546
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15