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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date/Time issues 1

Status
Not open for further replies.

millzy7

Programmer
Dec 9, 2003
96
0
0
US
Hi

I have a date field but all i am interested in is the time element ie HH:MM:SS.

How can i insert into this field a time of 00:45:00.

Also how can i retrieve just the time element from the date field?

Thanks
 
To create a time in a date field use

[tt]To_Date('00:45:00','HH24:MI:SS')[/tt]

To read the time back from the field use

[tt]To_Char(date_field,'HH24:MI:SS')[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top