AnsweredAssumed Answered

Elapse Date

Question asked by thong127 on Jul 18, 2009
Latest reply on Jul 20, 2009 by thong127

Title

Elapse Date

Post

Hi to everybody,

 

Thanks to Mr_Vodka for your suggestion regarding my auto fill problem...your suggestions using looked-up it works for me.

 

Now, I have again another problem, I want to know how many years, months, and days remaining before a certain product reach its expiration date base from present date.

 

In my table I have an "Expiration Date" field and I have also a field "No. of Days to Expire" with a calculation of                 

(Let([

 

today = Get (CurrentDate ) ;

days = Expiry Date - today ;

md = Date (0 ; days + 1 ; Year ( Expiry Date ) ) ;

y = Int ( days / 365)];

 

y & "years," & Month ( md ) & "months, & Day ( md ) & "days"

 

Is

 

Which  I based from Danny Leung.

 

But when I tried to enter data into the field "Expiration Date" 8/9/2009 and the prresent date is July 18, 2009 (7/18/2009) the result must be 22 days but it returns to ) 0 years, 12 months, & 23 days. Please help me to organize the calculation.

 

Thank you very much and more power

Outcomes