# Date Calculation

I have a form that I like to be bale to know how many day shave been from the that the claim done.

so I have a filed that has a date 12/12/2011 I want to have a filed next to it that gives me the amount of days that have gone by between that date and the current date.

Thanks
LVL 1
###### Who is Participating?

Commented:
From your previous description I think you will have three Dates;  "Date of Loss", "Date Reported" and you mentioned "Date Created". I think you will need a fourth; "Date Closed".

The function "Get ( CurrentDate )" is a FileMaker function that returns...  You guessed it...  the current date, Today.

So to calculate the number of days between any two dates, subtract one from the other.

(Quotes are added for better definition. Don't use the quotes.)
"Date Reported" - "Date of Loss" is the number of days between the two events.
"Get ( CurrentDate )" - "Date of Loss" then is the number of days between these two events.

The new date I recommended is "Date Closed" (use whatever terminology for your industry) is when you want to quit using the "Get ( CurrentDate )" and indicate that no more days are important.  The item is finished, closed, ended...  So how do we do both, use the "Get ( CurrentDate )" and "Date Closed" to calculated the number of days between the events.  This is where you would use the formula I posted previously.

If ( IsEmpty ( "Date Closed" ) ; "Get ( CurrentDate )" ; "Date Closed ) - "Date of Loss"

This formula says if we don't have a "Date Close" use the current date, otherwise use the "Dated Closed".  And from the result subtract the "Date of Loss".

Maybe its more than you wanted to know, but I had fun with it...  :-)  Good luck.
0

Commented:
hi

you need to give some more detailes, like what software, what kind of form.
anyhoo if you are using exel just Subtract you date from the other date and it will give you the days number.

=12/12/2012-12/12/2010
0

Commented:
0

Commented:
It is a very simple calculation:

Get ( CurrentDate ) - YOUR_DATE_FIELD

If you want the time too:

Get ( CurrentTimeStamp ) - YOUR_TIMESTAMP_FIELD
0

Author Commented:
North,

So the cal I should do it on the age filed, correct?
0

Commented:
Yes, it could be a calculated field.
0

Author Commented:
North,

I may have explained it wrong...

I have a filed named datecreated ( record cleaning filed ) and I have a filed named date of loss.

I want to know how many days have gone by from the time the loos happended till the day it is being reported.
see error when I input your suggestion
Error.png
0

Commented:
Get ( CurrentDate ) and Get ( CurrentTimeStamp ) are Get functions and should be used exactly.  Get ( CurrentDate ) returns todays date.  So to find the number of dates between the dateofinsuranceloss and today you would use

Get ( CurrentDate ) - dateofinsuranceloss

To also continue the discussion, I suspect you will have different dates; One for the Date Reported and one for the Date of Loss.  With this in mind you may want to explore using the Get function only when the Date Reported is not filled in.  Something like:

If ( IsEmpty ( Date Reported ) ; Get ( CurrentDate ) ; Date Reported ) - Date of Loss

Something like that, anyway...
0

Author Commented:
North,

Not sure I follow, I want to know how many days have  passed from the time of the loss to the current date.
I'll try your above cal. Will let you know on the road right now.
Thanks for all of your help.
0

Author Commented:
North,

That worked great!
Thank you very much.
0

Author Commented:
North knows,,,
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.