Help! using FM for formating date with to_char()

Hi,
Basically my requirement is to format the date in specific format (i.e. DD MM YYYY HH24:MM) and it should avoid the padding zeros.
Ex: 03-Jun-2009 10:01 should be displayed as 3 Jun 2009 10:01.
I was using the below query
to_char(sr.recievedat, 'FMDD Mon yyyy HH24:MI')...
But the thing is it removing the padding zeros from minuites aswell, which i dont require.
For example,
Ex1: 03-Dec-2009 18:10    3 Dec 2009 18:10
*04-Dec-2009 19:01 4 Dec 2009 19:1.. It should be 4 Dec 2009 19:01*
Can some body help me how to control the FM to restrict the padding to some places
Thanks
Phani

Hi try this
sql> select to_char(sr.recievedat, 'FMDD Mon yyyy fmHH24:MI') from dual;example
SQL> select to_char(to_date('01-jan-2009 7:01:06','dd-mon-rrrr HH:MI:SS'), 'FMDD Mon yyyy fmHH24:MI'
) from dual;
TO_CHAR(TO_DATE('01-JAN
1 Jan 2009 07:01

Similar Messages

  • Formating dates with to_char function

    Hi,,
    Inside a pl/sql procedure Im formating a date:
    v_start_date := 2011-04-01 05:00:00;
    v_start_month := to_char(v_start_date,'mm');and I need that v_start_month returns = 04
    but returns 4
    What could I do to fix it
    Many Thanks..

    If you define v_start_month as a number then it will strip off the leading 0 when it displays. Define v_start_month as a varchar and it will display the way you want.
    SQL> DECLARE
      2    v_month    VARCHAR2(10);
      3  BEGIN
      4    v_month := to_char(SYSDATE,'mm');
      5    dbms_output.put_line(v_month);
      6  END;
      7  /
    08

  • Error handling for master data with direct update

    Hi guys,
    For master data with flexible update, error handling can be defined in InfoPackege, and if the load is performed via PSA there are several options - clear so far. But what about direct update...
    But my specific question is: If an erroneous record (e.g invalid characters) occur in a master data load using direct update, this will set the request to red. But what does this mean in terms of what happens to the other records of the request (which are correct) are they written to the master data tables, so that they can be present once the masterdata is activated, or are nothing written to masterdata tables if a single record is erroneous???
    Many thanks,
    / Christian

    Hi Christian -
    Difference between flexible upload & Direct upload is that direct upload does not have Update Rules, direct upload will have PSA as usual & you can do testing in PSA.
    second part when you load master data - if error occurs all the records for that request no will be status error so activation will not have any impact on it i.e. no new records from failed load will be available.
    hope it helps
    regards
    Vikash

  • Best practice for sharing data with model window

    Hi team,
    what would the best practice for sharing data with a modal
    window be ? I use a modal window to display record details from a
    record list, but i am not quite sure how to access the data from
    the components in the main application in the modal window.
    Any hints would be welcome
    Best
    Frank

    Pass a reference to the parent into the modal popup. Then you
    can reference anything in the parent scope.
    I haven't done this i 2.0 yet so I can't give you code. I'll
    post if I do.
    Oh, also, you can reference the parent using parentDocument.
    So in the popup you could do:
    parentDocument.myPublicVariable = "whatever";
    Tracy

  • How to Use SOAPArray to Exchanged Data with a Web Service

    The method of a prototype Web service I created is defined to take many parameters
    and return an object of a user defined class. Furthermore, the user defined class
    includes data elements of another user defined class and the Java ArrayList class.
    This works with a Java client referencing the WebLogic created client.jar file
    but I don't know how well it will work with a non-Java client. In particular,
    with Perl which is the language that will be used by the developer who first will
    test with the prototype.
    In posts to this newsgroup use of "language-specific, generic containers" has
    been discouraged and the "language-agnostic" SOAPArray recommended. I have searched
    this newgsroup and the Web for examples of how to use a SOAPArray in a Web service
    EJB to receive parameters and return results but found none.
    Will someone refer me to an example or give an overview of how a Java Web service
    EJB running in WebLogic 6.1 would use SOAPArray to get parameter values and return
    results?
    Also, I would like confirmation that it is best to use SOAPArray to exchange data
    with a Web service to achieve the goal of a service accessible by any language.
    Thank you.

    Replies in-line:
    How are the structures, e.g. gltrans-workType, defined in the Web service?The structure is made up of nested Java Beans, but this does not mean that the
    client for your web service has to be written in Java. The WSDL that I sent contains
    everything that a .NET-based (or Perl-based, or Python-based, or VB-based, or
    C++ based) Web Service Stack needs to correctly create all the data types in the
    web services' signature! That's the beauty of XML Schema! It's programming language
    independent :-)
    In
    other words, what definition in Java resulted in the WSDL statements?The WSDL wasn't produced by WLS 6.1, but it (WLS 6.1) can consume it.
    What is the signature of method submitGLTransWorkAsJavaBean() in the
    Web service?public void submitGLTransWorkAsJavaBean(GlTransactionsCpyType glTransactionsCpyType)
    GlTransactionsCpyType is the outer-most Java Bean. WLS 6.1 does not generate
    Java Beans for you, but it will use ones that you defined. See the Java Bean tutorial
    on the Javasoft sitem for details on how to create a Java Bean.
    Was the WSDL generated using the WL tools for creating a Web service?No.
    Conclusion:
    You asked for someone to provide you with an example of how to use SOAP array
    in a WSDL, which is what the attached file contained :-) What you want to do now
    is find a tool that can generate Java Bean code from this WSDL (Apache Axis has
    a wsdl2java tool that should work), or create the Java Beans yourself. Afterwards,
    create a WLS 6.1 Web Service a expose it for a Perl or .NET client.
    Regards,
    Mike Wooten
    "Jeff Carey" <[email protected]> wrote:
    >
    Please elaborate.
    How are the structures, e.g. gltrans-workType, defined in the Web service?
    In
    other words, what definition in Java resulted in the WSDL statements?
    What is the signature of method submitGLTransWorkAsJavaBean() in the
    Web service?
    Was the WSDL generated using the WL tools for creating a Web service?
    Thank you.
    "Michael Wooten" <[email protected]> wrote:
    Hi Jeff,
    Sounds like a pretty cool prototype :-)
    I have attached a WSDL (at the bottom of this post) that contains a<schema>
    that
    uses a SOAPArray to create an array of a <complexType>.
    HTH,
    Mike Wooten
    "Jeff Carey" <[email protected]> wrote:
    The method of a prototype Web service I created is defined to take
    many
    parameters
    and return an object of a user defined class. Furthermore, the user
    defined class
    includes data elements of another user defined class and the Java ArrayList
    class.
    This works with a Java client referencing the WebLogic created client.jar
    file
    but I don't know how well it will work with a non-Java client. Inparticular,
    with Perl which is the language that will be used by the developerwho
    first will
    test with the prototype.
    In posts to this newsgroup use of "language-specific, generic containers"
    has
    been discouraged and the "language-agnostic" SOAPArray recommended.
    I have searched
    this newgsroup and the Web for examples of how to use a SOAPArray in
    a Web service
    EJB to receive parameters and return results but found none.
    Will someone refer me to an example or give an overview of how a Java
    Web service
    EJB running in WebLogic 6.1 would use SOAPArray to get parameter values
    and return
    results?
    Also, I would like confirmation that it is best to use SOAPArray toexchange
    data
    with a Web service to achieve the goal of a service accessible by any
    language.
    Thank you.

  • LSMW used only for master data upload?

    Hi
    Can you please let me know if LSMW is used only for master data upload or we can also use it for transaction data ?

    Hi Christino.
    I have come across a standard SDN thread which deals with the uploading master data, refer it:
    [SDN Reference for uploading master data using LSMW|how can we upload master data by using LSMW;
    [SDN reference for which uploading is preferred (Master data or Transaction data)|Which one is better for uploading data LSMW or ECATT ?;
    Good Luck & Regards.
    HARSH

  • Help: FSB Setting for MSI 875P with Intel 3.06 533Mhz & Corsair 512 27

    Help: FSB Setting for MSI 875P with Intel 3.06 533Mhz & Corsair 512 2799 333Mhz
    Need a little help here, Intel's specs for the P4 3.06GHz 533 is a multiplier of 23 x 133Mhz.
    However 133Mhz as a FSB seems very slow.
    The 875P NEO has two BIOS settings: CPU Ratio and Adjust CPU Bus
    What are your settings for these - I am quite confused?
    Thanks!
    G.

    133 is the stock FSB setting. set your memory to DDR333.
    Do you want to overclock? you might want to set your memory to DDR266 which is 1:1. so u can adjust a bit of FSB from 133 to maybe 150.
    PS dont forget your memory timing. 2-6-3-3 would be oki i think. what bios version r u using?

  • I have an old iphone and have a new one as well. I would like to use my old on as an ipod but itunes not longer recognizes it.  Any ideas?  I have been using it for a month with no problems until tonight. I restarted my computer..still no fix.

    I have an old iphone and have a new one as well. I would like to use my old on as an ipod but itunes not longer recognizes it.  Any ideas?  I have been using it for a month with no problems until tonight. I restarted my computer..still no fix.

    Looks like its fixed.     I am syncing it now.      A lot of the answers are for the new iphone so i had to mess with a bunch of settings as well.  My old phone is now an 8 gig ipod.  the books app no longer works and that *****.....but better than nothing...

  • What are Parameters? How are they differenet from Variables? Why can't we use variables for passing data from one sequnece to another? What is the advantage of using Parameters instead of Variables?

    Hi All,
    I am new to TestStand. Still in the process of learning it.
    What are Parameters? How are they differenet from Variables? Why can't we use variables for passing data from one sequnece to another? What is the advantage of using Parameters instead of Variables?
    Thanks in advance,
    LaVIEWan
    Solved!
    Go to Solution.

    Hi,
    Using the Parameters is the correct method to pass data into and out of a sub sequence. You assign your data to be passed into or out of a Sequence when you are in the Edit Sequence Call dialog and in the Sequence Parameter list.
    Regards
    Ray Farmer

  • My iphoto will not open for some reason. the cursor just keeps running...been using this for 3 years with no problem. It started doing this after I tried to load some photos from a camera I have successfully used before

    I cannot open my Iphoto on my macbook pro. I have used it for three years with no problem. However, after trying to load some pictures from my camera it seems to have frozen up. I force quit it and have not been able to get past the opening blank window since ...cursor still blinking as if it is downloading or trying to open.

    What version of iPhoto?

  • How to assign search help using ovs for select options for ALV in web dynpr

    how to assign search help using ovs for select options for ALV in web dynpro

    Hi,
    refer http://wiki.sdn.sap.com/wiki/display/WDABAP/InputhelpofObjectValueSelectioninWDABAP
    http://www.****************/Tutorials/WebDynproABAP/OVS/page1.htm
    and http://wiki.sdn.sap.com/wiki/display/Snippets/WebDynproAbap-OVSsearch+help
    Thanks,
    Chandra

  • Hello I bought a G-Raid GR4 4000 4 TB and used it for a backup with my new Imac27. Now this is all I get. "Time Machine couldn't complete the backup to "G-RAID". to complete backup. An error occurred while creating the backup folder.

    Hello I bought a G-Raid GR4 4000 4 TB and used it for a backup with my new Imac27. Now this is all I get. "Time Machine couldn’t complete the backup to “G-RAID”. to complete backup. An error occurred while creating the backup folder."
    Any idea what I should do?

    If you have more than one user account, these instructions must be carried out as an administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Enter the word "Starting" (without the quotes) in the String Matching text field. You should now see log messages with the words "Starting * backup," where * represents any of the words "automatic," "manual," or "standard." Note the timestamp of the last such message. Clear the text field and scroll back in the log to that time. Select the messages timestamped from then until the end of the backup, or the end of the log if that's not clear. Copy them (command-C) to the Clipboard. Paste (command-V) into a reply to this message.
    If all you see are messages that contain the word "Starting," you didn't clear the search box.
    If there are runs of repeated messages, post only one example of each. Don't post many repetitions of the same message.
    When posting a log extract, be selective. Don't post more than is requested.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Some personal information, such as the names of your files, may be included — anonymize before posting.

  • Use Firefox for sensitive data & use a virtual keyboard plus internet antivirus. This current version does not allow such or an extension . Can you make provision for this?

    Use Firefox for sensitive data & use a virtual keyboard plus internet antivirus. This current version does not allow such or an extension . Can you make provision for this?

    Use Firefox for sensitive data & use a virtual keyboard plus internet antivirus. This current version does not allow such or an extension . Can you make provision for this?

  • I been using viber for a long with no problems until today it's restarting on its own and once I enter the code it try's to sync contact it restarts again.  I tried reinstalling but it's still the same. Please replay ASAP

    I been using viber for a long with no problems until today it's restarting on its own and once I enter the code it try's to sync contact it restarts again.  I tried reinstalling but it's still the same. Please replay ASAP

    Contact Viber customer or technical support regarding a problem with their iOS app.

  • I've been using IMac for 3 years with Microsoft office. Today, I could not open any excel files? Any Ideas?

    I've been using IMac for 3 years with Microsoft office. Today, I could not open any excel files? Any Ideas?

    If you upgraded to Lion or Mountain Lion, and did not upgrade to Office 2008 or later, that may be part of the problem.  Try LibreOffice, OpenOffice, NeoOffice, Google Docs, or Zoho Docs.  See my FAQ* for link:  http://www.macmaps.com/crossplatform.html

Maybe you are looking for

  • External Hard Drive Error

    I connected a 60 gig external hard drive to my iBook G4, to transfer a 6 gig final cut pro final from my computer to another. In the middle of transfering, finder opens a window thata says "Error, this file cannot be moved" Why is it doing this?

  • How to disable or change the value of h:commandlink jsf component

    Hi, I am a student. I am using h:commandlink. I need to change the value of the component once it is clicked by the user. How do i do that? If i cannot change the displayed value of the commandlink. I am thinking of atleast disabling the link once th

  • Allign contents while broadcasting in PDF

    Hi all, There is a specfic requirement, pls suggest. The Web Templates in WAD are published in portal and broadcasted as PDF. 1.  The Graph, Tables are seen one after the other in PDF.  Where as in portal it is shown in a well alligned format.  2.  T

  • Space crunch due to large scanfiles generated

    Large amount of scan files are generated at " c:/windows/softwaredistribution/scanfiles ". these file size vary from 5GB -20GB and more.... We are using ZCM 11.2 in Windows server 2003 SP2 and Windows 2008 R2. It is impossible for us to go to every s

  • How to get Avery color? Illustrator CS5

    Can someone please help me get this colours in illustrator CS5? (Avery) I already know how to get the panton. I could'nt attached it this thread so I use imgur. [IMG]http://i.imgur.com/nXUyHsf.jpg?1[/IMG] And also How can I get this  Gradiation? C= 7