Hi guys,
I've got a report which gets some alarm date/time values from a database. These values are in the format "dd/mm/yyyy hh:mm:ss".
I'd like to print a blank space " " if the date/time value in the database is 0. Having not used crystal much before, I thought this would be easy. However, for some unknown reason it's forcing me to have a date/time output since I'm checking the status of a date/time field. Here's my code:
IF {AlarmTime} > Date (1970,01 ,01 ) THEN {AlarmTime}
ELSE Date(0,0,0)
This works okay for the date part, but instead of printing a blank space, it prints out "0:00:00". I can't just format the formula field and suppress the time, because I need it to appear when a valid date actually exists.
Can anyone suggest a way I can get around this?
Andrew
I've got a report which gets some alarm date/time values from a database. These values are in the format "dd/mm/yyyy hh:mm:ss".
I'd like to print a blank space " " if the date/time value in the database is 0. Having not used crystal much before, I thought this would be easy. However, for some unknown reason it's forcing me to have a date/time output since I'm checking the status of a date/time field. Here's my code:
IF {AlarmTime} > Date (1970,01 ,01 ) THEN {AlarmTime}
ELSE Date(0,0,0)
This works okay for the date part, but instead of printing a blank space, it prints out "0:00:00". I can't just format the formula field and suppress the time, because I need it to appear when a valid date actually exists.
Can anyone suggest a way I can get around this?
Andrew