BusinessObjects Board

Between date with 2:30 hours before

Hi expert,

I am using formula =formatdate(relativedate(todate(formatnumber(max(([date]*1000000) +[time];“0”) ;“yyyyMMddHHmmss”) -2. 5/24) ;“dd:MM-yyyy”)

This formula given correct result.

Other formula using between

=daysbetween(currentdate() ;today(formatnumber([date];“0”) ;“yyyyMMdd”))

This also working fine but showing server date.

I need between formula with -2. 5 hours.

I tried below formula:

=daysbetween(currentdate() ;formatdate(relativedate(todate(formatnumber(max(([date]*1000000) +[time];“0”) ;“yyyyMMddHHmmss”) -2. 5/24) ;“dd:MM-yyyy”)

But given error

Pls confirmed where is lacking.

BR
Sultan

Hey Sultan,
I’m not sure how your first formula worked cause you are missing a parenthesis there
If you read the error message you are also missing parenthesis at your last one; 2 in totaal by my count
1 for closing formatdate and another for daysbetween

Are you trying to calculate the time 2.5 hours (150 minutes) prior to the current date/time?

If so, it’s a simple formula:
=RelativeDate( CurrentDate() ; -150 ; MinutePeriod )

If not, you need to clearly explain what it is you are trying to accomplish.

1 Like