Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

total days in between two dates

hello

how to find total days in between two dates?

thank you

6 Replies
craigsutton
Creator
Creator

Since dates are stored as dual both number and date, you can subtract the end date from the start get and use the floor function to get total number of days between two dates.

Floor(Num(DateEnd-DateStart))

Anonymous
Not applicable
Author

thanks craig..

i come to know one thing, i have only one date field and want find total sales between two date ?

vishsaggi
Champion III
Champion III

You mean your End date should be something like Today()?

sergio0592
Specialist III
Specialist III

You can enter your dates in variables (V_Start_date, V_End_date) with two input box.

Expression=sum({<[Sales date]={">=$(=Start_date) <=$(=End_date)"}>}  Sales)

Anonymous
Not applicable
Author

yes

vishsaggi
Champion III
Champion III

You want this in Script? Just extending Craig's expression you can try like:

Num(Floor(Today() - StartDate)) AS DaysDiff