How to SELECT the Time from a DATETIME Field?
I need some help with a query. I want to select all the rows in a
DateTime column that do not have a "time" value with the date. In other
words, the column name is "datetime", the values in this column would
be in the for of, e.g., "14-DEC-09 08:12:21 PM".
I've tried several queries, including the following, but returns 0 records:
SELECT TO_CHAR(date_time, 'hh:mi:ss PM')
FROM fault_events
WHERE to_char(date_time, 'hh:mi:ss PM') IS NULL
When running the following query:
SELECT date_time
FROM fault_events
WHERE date_time LIKE '03-JUL-09'
I've tried several queries, including the following, but returns 0 records:
SELECT TO_CHAR(date_time, 'hh:mi:ss PM')
FROM fault_events
WHERE to_char(date_time, 'hh:mi:ss PM') IS NULL
When running the following query:
SELECT date_time
FROM fault_events
WHERE date_time LIKE '03-JUL-09'
0