5 Replies Latest reply on Jan 8, 2019 4:30 AM by Mavaneeta B

# Difference between two dates

Hi All,

I want to see the difference between present date and one specified date. can you anyone help me on this how to show.

Ex: want to see the difference between Today date and last 20 days back date.

• ###### 1. Re: Difference between two dates

What do you mean difference? Difference in a value (e.g. sales) or in the period (days, weeks, etc.).

For the latter, you can use the DATEDIFF function.

For the former, you can use the FIXED LOD to gate the value per date.

• ###### 2. Re: Difference between two dates

Hi Harish,

2 of 2 people found this helpful
• ###### 3. Re: Difference between two dates

Hello Harish,

You can check this calculation to achieve your requirement

{ FIXED [Order Date]=[today] : SUM([Total Profit])}

-

{ FIXED [Order Date]=[today]-20 : SUM([Total Profit])}

• ###### 4. Re: Difference between two dates

Hi Harish,

You can use below formula to find the difference.

DATEDIFF('day',attr([Order Date]),attr(TODAY()))

Thanks

Kishore K

• ###### 5. Re: Difference between two dates

Hi,

Step:1

Take a parameter of date type to select a date value i.e., previous date.

for instance, lets say the name of parameter is Previous_date.

Step:2

Now create a cal. field: No.of days

If DateDiff('day',Previous_date,today()) AND Previous_date <= Today

THEN sales

Step:3

Right click on the parameter, click on show parameter, drag the cal.field into the Rows and sales into the Text of the marks card

Step:4

select a date in the parameter, you will be able to see the sales as per the selected date.

Mark it as correct, if it is a right answer, thank you.

Regards,

Mavaneeta