RE: time format help

RE: time format help

 

  

Hello,

I would try either PM or AM in the format specification -both work:

MYDB> select to_char(sysdate,'hh.mi.ss pm') from dual;

TO_CHAR(SYSDATE,'HH.MI.SS PM')
------------------------------------------------------------------------
---
09.22.45 am

1 row selected.

MYDB> select to_char(sysdate,'hh.mi.ss am') from dual;

TO_CHAR(SYSDATE,'HH.MI.SS AM')
------------------------------------------------------------------------
---
09.23.03 am

1 row selected.


Philippe Valentin

Please consider the environment before printing this email.



-----Original Message-----
From: Sanju Gupta
[mailto:oracledba-ezmlmshield-x28410644.[Email address protected]
Sent: Saturday, March 29, 2008 6:12 AM
To: LazyDBA Discussion
Subject: time format help




hi all

i want to simply convert the time from am to pm.

for example

given -- '29/03/2008 4:12:35 am'

needed output --'29/03/2008 4:12:35 pm'

thanks in advance
sanju


---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
--------------------------------------------------------

This message w/attachments (message) may be privileged, confidential or proprietary, and if you are not an intended recipient, please notify the sender, do not use or share it and delete it. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Merrill Lynch. Subject to applicable law, Merrill Lynch may monitor, review and retain e-communications (EC) traveling through its networks/systems. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or error-free. This message is subject to terms available at the following link: http://www.ml.com/e-communications_terms/. By messaging with Merrill Lynch you consent to the foregoing.
--------------------------------------------------------

Oracle LazyDBA home page