Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Difference of a field between 2 variable dates

blaisjoel

Technical User
Nov 25, 2024
1
Trying to find the difference from a field when it's the first date of the year and the last date of the year.
I have create an if statement to retreive the first date and last date from a field.
I can't seem to figure how to get the difference of a field where the first and last date applies.
Here is the formula for the first and last date:

Code:
Numbervar FirstDate;
numbervar LastDate;


if{@MyDate}={@Day First} then FirstDate:= {vehaudfl.aud_trans_lfmeter}
Else if {@MyDate}={@Day Last} then LastDate:= {vehaudfl.aud_trans_lfmeter}

Now I need to get the difference between the fields value: Last Date-First Date
 

Part and Inventory Search

Sponsor

Back
Top