I am trying to adapt from Toad for Oracle to Toad Data Point, and one thing that’s been difficult for me is the handling of timestamps in the results grid. (Note: I am referring to Oracle DB connections in this post.)
If you run the statement below, it defaults the timestamp to midnight. I know that’s what the TRUNC() function does behind the scenes, but in Toad for Oracle it would remove the timestamp and leave just the date. Really in Toad for Oracle I think anytime the timestamp was midnight, it leaves it off and only displays the date.
SELECT TRUNC(SYSDATE) FROM DUAL ;
Result:
2/21/2019 12:00:00 AM
Desired Result:
2/21/2019
Question:
I would just apply a custom format and make it always display date fields without the timestamp, except I often have a mix of both date and datetime fields in the same dataset. I need to see the timestamp for some of the fields, but I want the timestamp suppressed/removed when it’s midnight (or truncated via the function). Is there a way to do this, perhaps with special syntax in the custom format setting? I’ve been unable to find anything like this by simply Googling it, so any help you can offer is much appreciated!