Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: how to get the time part of a DATETIME datatype?

Re: how to get the time part of a DATETIME datatype?

From: PWalker <pwalker_at_nospam.com>
Date: Wed, 22 Jun 2005 20:18:13 +1000
Message-ID: <42b93aa3$1@dnews.tpgi.com.au>

"Mark C. Stock" <mcstockX_at_Xenquery .com> wrote in message news:maudnSywX_lPpCTfRVn-gg_at_comcast.com...
>
> "PWalker" <pwalker_at_nospam.com> wrote in message
> news:42b938cd_at_dnews.tpgi.com.au...
>> Hi, I was hoping someone could help me. I am trying to display the time
>> part of a datetime datatype in my query (in this isntance the column
>> containing the datetime datatype is called 'starttime'). How does one
>> accomplish this? I want to see the time via a simple select statement:
>>
>> select starttime from mytable;
>>
>> I was trying to use 'convert' statements, but I wasnt able to get it
>> working. Could someone tell me how to do this? I do not want to start
>> configuring system files as the server is fairly locked down.
>>
>> Could anyone point me in the right direction?
>>
>> Thanks!
>>
>> cheers, peter
>>
>
> for display, you want TO_CHAR with the appropriate format model, as listed
> in Oracle's SQL manual
>
> ++mcs
>

That was a quick response! I did a search for 'to_char' on www and found it. Many thanks! Ill try it out at work tomorrow.

cheers, peter Received on Wed Jun 22 2005 - 05:18:13 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US