General discussion

Locked

get time

By dredd ·
in oracle is there a way wherein i could extract only the time of a certain date column


regards,
danny

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

get time

by fenaikh In reply to get time

Hi
Use to_char
example:
to_char(now(), 'HH12:MI:SS')
result:
'05:39:18'
Good luck

Mohamed

Collapse -

get time

by dredd In reply to get time

HI sir,
kindly correct my script.. it post an error of invalid number wen running

select nba_entrydate
from nb_appl
WHERE nba_entrydate = to_char('12:10', 'HH12:MI')

regards,
danny

Collapse -

get time

by fenaikh In reply to get time

Hi
In this case the nba_entrydate should be a full date and to get PM and AM I used HH24.

select nba_entrydate
from nb_appl
WHERE to_char(nba_entrydate,'HH24:MI') = '12:10';


Good luck
Mohamed

Collapse -

get time

by dredd In reply to get time

THANKS A LOT

Collapse -

get time

by RSV In reply to get time

HI,
YES, you can extract the time from the date column using to_char function.

For example:
SELECT to_char(sysdate,'HH24:MI:SS) FROM DUAL;

Hope this will helps you.
GOOD LUCK...:)

Collapse -

get time

by dredd In reply to get time

Poster rated this answer

Collapse -

get time

by dredd In reply to get time

This question was closed by the author

Back to Web Development Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums