Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Extract Time from Date

bdc9a4d2-510a-43a0-9aa2-fd6e004ffe7fNov 26 2015 — edited Nov 26 2015

Hey,

Im new at Oracle and had some question regarding how the Date to time conversions takes place.I have a table with data fields defined as

    

COLUMN NAMEDATA TYPENULLABLEDATA DEFAULT
DT_COMPLETEDDATEYesNULL
DT_RECEIVEDDATEYesNULL

If I do a select then I get result in the following format:

16-JAN-01

30-JAN-01

05-MAR-01

Ques : Does the DATE type save time values as well even though I do not see them in the select result?

If i run the following query

SELECT   DT_RECEIVED, TO_CHAR(DT_RECEIVED,'HH24:MI:SS')

FROM

TABLEX

I get the following result:

16-JAN-0113:37:00
30-JAN-0115:28:00
05-MAR-0113:49:00

QUES:If the same query returns the following data set, does the 00:00:00 mean 12:00:00 am ??

20-SEP-1500:00:00
20-SEP-1500:00:00

This post has been answered by RakeshChowdary Paleti on Nov 26 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 24 2015
Added on Nov 26 2015
7 comments
1,987 views