I'm dealing with a dateTime such as '1800-01-01 00:00:00' and I want to convert it to a string = 'N/A', but keep everything else as a dateTime.
I tried converting it to a string (To_char(date_time)) AS date_time2 in a subquery and in the main query I created a case statement:
WHEN date_time Like '1800-01-01 00:00:00' THEN 'N/A' ELSE date_time.
It would work, however when I want to convert it back to a dateTime value the 'N/A' string disappears since it can't be converted to time. How can I avoid this problem???