cancel
Showing results for 
Search instead for 
Did you mean: 

CASE date variable

0 Kudos

I am recreating a report from cognos to saps/4 in bobj. I need to create a variable to pull into the report as a column. Here is the cognos expression:

case

when

current_date > [Request Date]
then

current_date - [Request Date]
else null

It does not appear I can use 'case' in a bobj variable? How can I recreate this?

Accepted Solutions (0)

Answers (2)

Answers (2)

mhmohammed
Active Contributor
0 Kudos

Hi Kate,

Use the below formula

=If(CurrentDate()>[Request Date]) Then DaysBetween([Request Date];CurrentDate())

Thanks,
Mahboob Mohammed

0 Kudos

Thank you, that worked!!

mhmohammed
Active Contributor
0 Kudos

Hi Kate,

Please make as correct answer, for better visibility.

Thanks,
Mahboob Mohammed

ayman_salem
Active Contributor
0 Kudos

use IF ..THEN ... ELSE ...