Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

data type for time

Status
Not open for further replies.

canobe

Technical User
Jan 18, 2003
86
MY
what is the data type for the time? isn't it 'date'? i have two time field in my database, but when i insert a value example: '07:00' and '15:00' into it giving me message that not a valid month. i am wondering whether the data type for the time is 'date' or not. thank you.
 
Canobe,

You are correct...Oracle supports only one format for chronologic data: DATE. Oracle internally represents every date with the following components: Century, Year, Month, Day, Hour, Minute, Second. Unfortunately, Oracle does not support a "time-only" data type.

In cases where there is no date component and I wish to represent time only, I often create numeric "hr" and "min" columns and do arithmetic operations accordingly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top