How to distinguish date at midnight from date w/o time in Oracle?
- by Swiety
I would like to distinguish date at midnight (i.e. '12/05/2010 00:00:00') from date without time specified (i.e. '12/05/2010').
This value is provided by user, sometimes it is only date which is important, sometimes it is date and time and later the application is expected to show the time only when it was explicitly provided.
So for the following inputs I would expect the following outputs:
for '12/05/2010' I would expect '12/05/2010'
for '12/05/2010 09:23' I would expect '12/05/2010 09:23'
for '12/05/2010 00:00' I would expect '12/05/2010 00:00'
I know I can model it in two separate columns, date and time, but I was wondering was there any way of handling this in single date column?