cancel
Showing results for 
Search instead for 
Did you mean: 

Compare Date Attributes to 31.12.9999

Former Member
0 Kudos

Hi.

I try to create a formular that compares a date InfoObject to 31.12.9999 to do some special calculation on it. I created a formular variable and to a calculation like this in it: Z_DATE_VAR == 99991231. But it failed... I think the reason for this is that dates are handled like numbers starting from 01.01.1900 internally. So what i the best way to handly this without using ABAP (like to have this as backup plan ).

Can I compare the date to 3.652.060 and have a correct result everytime?

Cheers,

Nils

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186445
Active Contributor
0 Kudos

how did you define the formula variable? it should normally work.

M.

Former Member
0 Kudos

Dear,

When you want to Date Comparision then you should create formula Variables with Replacement path.

Suppose you have Date A and Date B. Create 2 Formula Variables with replacement path and then create calculated keyfigure or local formula to compare.

This should definetly work and let me know if you face any issues in this

Regards,

Kishanlal Kumawat

Former Member
0 Kudos

Hi.

I do not like to do a comparison between two dates I like to identify a specific date with helpof a constant. But I cannot compare Z_DATE_VAR == 99991231 directly. I have to use Z_DATE_VAR ==  3.652.060 because this should be the representation for the date. Is this the only option to compare a date formular variable against a constant?


Cheers,

Nils

Former Member
0 Kudos

Hello,

Then you can do one thing.

Make a Restricted Keyfigure which restricts calday by constant 31.12.9999. and then use this Keyfigure for comparision. against formula varaible.

I hope i understood your requirement correctly

Regards,

Kishanlal Kumawat