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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: TO_CHAR(msg_date, 'HH24:MI:SS.FF')

RE: TO_CHAR(msg_date, 'HH24:MI:SS.FF')

From: Looney, Jason <Jason.Looney_at_echostar.com>
Date: Thu, 20 Jan 2005 08:51:14 -0700
Message-ID: <B8C9CF34B3F7164282C8610C93BB94AF04C6369C@riv-exchb1.echostar.com>


The difference is between SYSDATE and SYSTIMESTAMP. SYSTIMESTAMP is a TIMESTAMP and the extended format is available. SYSDATE does not contain milliseconds or timezone information. If you change the column def of saud_log to TIMESTAMP, then your select from saud_log will work as well.

Jason.

-----Original Message-----
From: Leonard, George [mailto:GLeonard_at_wesbank.co.za] Sent: Wednesday, January 19, 2005 10:38 PM To: oracle-l_at_freelists.org
Subject: TO_CHAR(msg_date, 'HH24:MI:SS.FF')

Hi all,

Example of insert string

Insert into saud_log (sysdate(),'some text'); Commit;

I now want to retrieve the text in date/time order.

Since multiple insert can occur from the same package in a second I want to fine tune it to milliseconds.

But the below query is complaining about ora-01821 date format not recognised

select TO_CHAR(msg_date, 'HH24:MI:SS.FF4'), msg_desc from saud_log order by msg_date desc;

but I can run=20

SELECT TO_CHAR(SYSTIMESTAMP, 'HH24:MI:SS.FF4') from dual;

ideas

George
=20________________________________________________
George Leonard
Oracle Database Administrator
New Dawn Technologies @ Wesbank
E-mail:gleonard_at_wesbank.co.za
=20

You Have The Obligation to Inform One Honestly of the risk, And As a Person
You Are Committed to Educate Yourself to the Total Risk In Any Activity! Once Informed & Totally Aware of the Risk, Every Fool Has the Right to Kill or Injure Themselves as They See Fit!
=20

_________________________________________________________________________=
__________________________


The views expressed in this email are, unless otherwise stated, those of = the author and not those
of the FirstRand Banking Group an Authorised Financial Service Provider o= r its management.
The information in this e-mail is confidential and is intended solely for=
=20the addressee.

Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribut= ion or any action taken or=20
omitted in reliance on this, is prohibited and may be unlawful. Whilst all reasonable steps are taken to ensure the accuracy and integrit= y of information and data=20
transmitted electronically and to preserve the confidentiality thereof, n= o liability or=20
responsibility whatsoever is accepted if information or data is, for what= ever reason, corrupted=20
or does not reach its intended destination.

=20 ________________________________

--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jan 20 2005 - 11:03:29 CST

Original text of this message

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