Re: Date Difference Help Needed
- From: "Jeff Boyce" <JeffBoyce_IF@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 29 Jan 2006 04:09:38 -0800
Dave
We're not there, we don't know what your form looks like, or what you're
entering in your form. From you description, it sounds like you are trying
to take a difference between a date ("the current date") and a number ("that
amount of days"). DateDiff() only calculates the difference between two
dates.
By the way, your code appears to be calculating a value of "0" in some
situations -- that is not a date (or rather, a 0 in a date fields results in
a date in the late 1800's! Is that what you are trying to do?
--
Regards
Jeff Boyce
<Office/Access MVP>
"Dave" <mynotebook@xxxxxxxxxxxxxx> wrote in message
news:rLVCf.6796$jO.4641@xxxxxxxxxxxxxxxxxxxxxxx
> I need the difference between the below code and the current date. The
> number of days since it was Invoiced.
> Example; this would give on one of my records the following, but not
> differernce between that amount of days and the current date.
> -317
>
> =([FTimeBillingSub].[Form]![Text39],0) ,This gives the number of days
> since it was Invoiced
>
> Maybe my original formula for Text39 is off;
>
> It is ;
>
=IIf(Nz(DSum("BillAmt","TTimeBilling","TimeID=Forms!TimeCards!TimeID"),0)=Nz
(DSum("Payment","TPaymentSub","TimeID=Forms!TimeCards!TimeID"),0),0,DateDiff
("d",Date(),DMax("BillDate","TTimeBilling","TimeID=Forms!TimeCards!TimeID"))
)
>
>
.
- Follow-Ups:
- Re: Date Difference Help Needed
- From: Dave
- Re: Date Difference Help Needed
- References:
- Date Difference Help Needed
- From: Dave
- Date Difference Help Needed
- Prev by Date: Re: "sum" syntax for four fields
- Next by Date: Highlight a record on a continusform
- Previous by thread: Date Difference Help Needed
- Next by thread: Re: Date Difference Help Needed
- Index(es):
Relevant Pages
|