I have table that has date field. When I run a query, I see this:
01/10/2009 22:10:39
How can I retrieve only the time (IE: 22:10:39)
you can try this:
SELECT TO_CHAR(yourval, 'DD-MON-YYYY HH:MI:SS') FROM yourtable;
SELECT TO_CHAR(yourval, 'HH:MI:SS') FROM yourtable;
Edit: as @steven pointed out, to have 24 hours style use
SELECT TO_CHAR(yourval, 'HH24:MI:SS') FROM yourtable;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With