Any way to not get leading zeros in dates?

When displaying a date or time, I'm always getting leading zeros. Is there a simple way to not have them?
For example:
SELECT TO_CHAR(SYSDATE,'HH:MI PM') FROM dual;
Will show 02:07 PM. I'd like it just to be 2:07 PM
The flip side, that I don't want to see would be not having the zeros in minutes... I don't want 2:7 PM.

I don't know if there's a better way...
SELECT decode(substr(TO_CHAR(SYSDATE,'HH:MI PM'), 1,1), '0' ,substr(TO_CHAR(SYSDATE,'HH:MI PM'), 2) , TO_CHAR(SYSDATE,'HH:MI PM')) FROM dual;
thanks,
Narayan

Similar Messages

Maybe you are looking for

  • BP Sleas area table in CRM6.0

    Hi like tables KNV1 and KNVV in R/3 are there any similar tables in CRM to find SALES AREA data for any customer(BP) i found SMOKNVV but no use ...any other? Thanks Phani

  • Best way to update apps like Java and Adobe?

    Hi guys I just wanted to get some feedback on how best to deal with updating Java and Adobe. Of course a lot of this will be opinion and circumstance, but feedback would be useful. The 3 methods I am focusing on here is SCUP, the App model and the Pa

  • Did BSP limit function call?

    We have create a simple BSP application, there we call a function 'LANGUAGE_CODE_SAP_TO_ISO' first in a page. But if we call another function 'READ_TEXT' continuly, the later one never work anymore! Whatz up with our BSP? Our code in BSP application:

  • How to get the closest match strings

    Hello All, I am looking for a select statement that will compare the alphanumeric value of my input string and return the closest matching alphanumeric value from my Cache table. The Cache table has 2 columns. CREATE TABLE Cache ( ID int identity pri

  • Release procedure for PR

    Hi, I need to upgrade the existing release procedure for Purchase requistion. I have created new release groups, release codes and strategies. I have created new characteristics and have added that to the existing class which was being used. Now i am