Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have 2 dates - start date and end date. If start date = end date I should get the date difference as 1. If start date is today and end date is tomm. then the date difference should be 2. How do I get this.
I tried with interval and added 1 to it...does not work when using aggregate functions like sum etc.
Thanks
Lax
Hi ,
Add 1 to your resultant expression where the difference is getting calculated.
This will help.
For example :
num((date#('13/12/2014','DD/MM/YYYY')- date#('12/12/2014','DD/MM/YYYY'))+1,'#') = > 2
num((date#('12/12/2014','DD/MM/YYYY')- date#('12/12/2014','DD/MM/YYYY'))+1,'#') =>1
Thanks
just use nested if statement
if(Startdate=Enddate,1,
if(Startdate=today() and Enddate=today()+1,2,interval(Startdate-Enddate,'d')))
Something like this try
-----note may be there some symtax issue.
try this
=If('1/14/2014' = Today(), 1, '1/16/2014' - Today() + 1 )
Floor(vEnd) - Floor(vStart) + 1