Skip to Content
Oct 08, 2019 at 08:24 AM

IF THEN ELSE using Time as the criteria


This is my 2nd day using SAP Crystal Reporting and I have a very basic question.

I have a field that is date and time:

10/07/2019 7:30:00AM

I wanted to make an IF THEN statement based on only time (date does not matter).

To isolate time, I created a function TimeValue(Date_Time).

If the time is greater than 7AM, I want it to say “Yes”.

I am trying:

IF {@TimeValue} >= 7:00 THEN yes ELSE no

It keeps highlighting the colon in 7:00 and saying “The keyword ‘then’ is missing.

Any advice would be much appreciated.