Home » SQL & PL/SQL » SQL & PL/SQL » Problem in hh:min:sec?
Problem in hh:min:sec? [message #275659] Mon, 22 October 2007 04:25 Go to next message
tondapi
Messages: 99
Registered: August 2007
Location: usa
Member
Hi

I am new to sql i want to display only hh:min:sec with any date

How can i genrate it?
Re: Problem in hh:min:sec? [message #275661 is a reply to message #275659] Mon, 22 October 2007 04:30 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Using the appropriate format mask:
SQL> select to_char(sysdate, 'hh24:mi:ss') from dual;

TO_CHAR(
--------
11:30:27

SQL>
Re: Problem in hh:min:sec? [message #275663 is a reply to message #275659] Mon, 22 October 2007 04:35 Go to previous messageGo to next message
Michel Cadot
Messages: 64140
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Assuming you want to study and not just an answer, have a look at:
Database SQL Reference
Chapter 2 Database SQL Reference
Section Format Models
Subsection Datetime Format Models

Regards
Michel
Re: Problem in hh:min:sec? [message #275667 is a reply to message #275661] Mon, 22 October 2007 04:40 Go to previous messageGo to next message
tondapi
Messages: 99
Registered: August 2007
Location: usa
Member
it displaying date also i want to see only hh:min:ss
Re: Problem in hh:min:sec? [message #275669 is a reply to message #275667] Mon, 22 October 2007 04:41 Go to previous messageGo to next message
Michel Cadot
Messages: 64140
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Read the link and LittleFoot's answer. Do you see a date in his result?

Regards
Michel
Re: Problem in hh:min:sec? [message #275700 is a reply to message #275667] Mon, 22 October 2007 07:56 Go to previous message
joy_division
Messages: 4643
Registered: February 2005
Location: East Coast USA
Senior Member
tondapi wrote on Mon, 22 October 2007 05:40

it displaying date also i want to see only hh:min:ss


Really now? I'd like to see that. Sorry, but I do not believe you. Cut and paste your complete session.
Previous Topic: invalid connect
Next Topic: escape function
Goto Forum:
  


Current Time: Fri Dec 09 07:43:29 CST 2016

Total time taken to generate the page: 0.10391 seconds