cancel
Showing results for 
Search instead for 
Did you mean: 

Calculate number of days between two dates

former_member463021
Participant
0 Kudos
323

Hello,

I'd like to get a report that it calculates number of days between two dates.

One of them (date1) it hasn't values in a infoprovider, it is a user variable.

When a user executes the query, it shows a variable, user introduces a date (date1), and report shows a calculated ratio = date1 - date2 (date2 values are saved in a infoprovider).

The report hasn't filters.

Thanks.

View Entire Topic
former_member206568
Participant
0 Kudos

Hi Pedro,

I have not tested this. Maybe you can try and see if this works. Create two formula variables as follows:

Variable 1 - For the date in your InfoProvider. Make this a replacement path variable with the reference characteristic as the date field in your InfoProvider, replace InfoObject value key and dimension as date.

Variable 2 - Formula variable of type user entry. In this also keep dimension as date.

Create new formula Days = Variable 1 - Variable 2

Thanks!

former_member463021
Participant
0 Kudos

Thanks Loed,

It works!.

Loed
Active Contributor
0 Kudos

Huh? That's not me mate..

Anyway, good to know that your issue is already solved..

Regards,

Loed