Convert yyyy-MM-dd format to dd-MMM-yyyy format

Hi,
I want to Convert a string which is in yyyy-MM-dd format to a dd-MMM-yyyy date object.
Note: want to convert it as a date object not as a String.

You don't need to change the format to create a Date object! Like delta said above, Date objects do not have formats! Date objects have their own, unchangeable internal representation. The only time you need to worry about the format of a Date is when you display it to a user...in which case you use a DateFormat object, like SimpleDateFormat, which can create a Date from a String, or a String from a Date, in whatever format you choose.

Similar Messages

  • Convert YYYY-MM-DDTHH:mm:ss.000Z  format to Date

    Hi,
    I have a varchar2 field which stores date in the following structure '2009-12-22T23:45:57.000Z' and need to convert to a date format 'MM-DD-YYYY HH:MM:SS' How can I achieve this?
    Thanks
    VJ

    Hi guys! Sorry to revive this old post but I need to know how must I do to increase 1 second to this conversion?
    select to_char(TO_DATE(Translate(SUBSTR ( '2009-12-22T22:10:57+02:00' , 1, 19),'T',' '),'YYYY-MM-DD HH24:MI:SS'),'MM-DD-YYYY HH24:MI:SS') from dual;
    Note: the mask ,'YYYY-MM-DD HH24:MI:SS') <-- maybe must be another, because I have the offset +02:00.
    I read this about the mask for this type of date:
    ...YYYY-MM-DDThh:mm:ss±hh:mm 1985-04-12T10:15:30+04:00... *<-- here appear the symbol "±"*
    I must to perform a procedure to fix an error, bcz in other way must to do it manualy.
    Thanks! I will be waiting for your response.
    Thanks
    Max
    Edited by: 856116 on 02/05/2011 19:55
    Edited by: 856116 on 02/05/2011 19:56

  • How to convert sysdate to the format dd-mon-yyyy

    how to convert sysdate to the format dd-mon-yyyy

    <how to convert sysdate to the format dd-mon-yyyy>
    This question is better answered by thinking about about how Oracle dates work. SYSDATE is a pseudocolumn (function without any arguments) that returns a date value: it already is a date. Oracle date values are stored not as we see them, say 'DD-MON-YY', but as a series of bytes with the different date components from the millennium down to the second. We NEVER see dates as they are stored but use the formats for automatic conversion.
    To display a date the way you want use TO_CHAR() with an edit mask or as others suggested change your NLS_DATE_FORMAT (thought I advise against this as most systems use DD-MON-YY and porting queries from other systems or even OTN can easily break). To change a converted string back to a date use TO_DATE() with an edit mask.

  • How to convert (YYYY-MM-DD) to (DD-MM-YYYY)

    Hi Guys,
    I have one doubt on WDJ,
    While exporting data into Excel Sheet having date format is showing like the format (YYYY-MM-DD).
    But I need to convert into this format (DD-MM-YYYY). Can any one suggest me? How to convert (YYYY-MM-DD) to (DD-MM-YYYY)
    I was written this code for getting date from ECC System and Convert to String type.
    Date DelivDate = wdContext.nodePoDetails_ExcelData().getPoDetails_ExcelDataElementAt(i).getDeliv_Date();          
    String DelivDate1 = DelivDate.toString();     
    Date ShtDate = wdContext.nodePoDetails_ExcelData().getPoDetails_ExcelDataElementAt(i).getStat_Date();
    String ShtDate1 = ShtDate.toString();     
                //wdComponentAPI.getMessageManager().reportSuccess("ShtDate1::"+ShtDate1);
    Date ExptShpDate = wdContext.nodePoDetails_ExcelData().getPoDetails_ExcelDataElementAt(i).getExpt_Shp_Date();     
    String ExptShpDate1 = ExptShpDate.toString();
    Regards
    Vijay Kalluri

    Hi Greg,
    Still i haven't resolve the issue.
    SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy");
    sdf.format(date);
    Date DelivDate = wdContext.nodePoDetails_ExcelData().getPoDetails_ExcelDataElementAt(i).getDeliv_Date();
    String DelivDate1 = DelivDate.toString();
    could you please give me more clarification on above code. if possible.
    Regards
    Vijay Kalluri

  • Convert to a date format

    Hi,
    I have a table with a date field that comes as varchar2(20byte) with a content like this:
    20/Jan/2011
    and I need it to be converted toa real date format e.g. 20.01.2011.
    Please help,
    Thanks
    Walter

    Hi, Walter,
    user457173 wrote:
    Hi,
    I have a table with a date field that comes as varchar2(20byte) with a content like this:
    20/Jan/2011
    and I need it to be converted toa real date format e.g. 20.01.2011.'20/Jan/2011' is actually just as "real" as '20.01.2011'. Neither is a real DATE; both are strings.
    Please help,
    Thanks
    WalterUse TO_DATE to convert a string into a DATE:
    TO_DATE ( column_x
            , 'DD/Mon/YYYY'
            )Use TO_CHAR to display a DATE in a given format:
    TO_CHAR ( d
            , 'DD.MM.YYYY'
            )d can be any DATE, including the DATE returned by the TO_DATE function, above.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using.
    Edited by: Frank Kulash on Oct 25, 2011 7:57 AM

  • I want convert string to date format in Oracle

    Dear All
    I want convert string to date format in Oracle,Format is given below
    'Friday, 02 March 2012 2:44 PM' to '02/03/2012 2:44 PM'

    >
    Hi Parwez,
    I want convert string to date format in Oracle,Format is given below
    'Friday, 02 March 2012 2:44 PM' to '02/03/2012 2:44 PM'SELECT TO_DATE('Friday, 02 March 2012 2:44 P.M.', 'DAY, DD MONTH YYYY HH:MI A.M.') from dual;
    As well as what the other poster suggested, look here: http://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements004.htm#i34924
    HTH,
    Paul...

  • Converting varchar2 to date format

    I've converted date formats many times, but for some reason I'm getting an invalid number error when trying to convert a varchar2 column. I've tried the to_char and to_date function and I get the same result. The column is a date and it is formatted as DD-MON-YYYY, but I want to change it to MM/DD/YYYY. My query is below:
    select to_date('fccpdate','MM/DD/YYYY')
    from cc_class_scmast_v
    When I try to_date I get this:
    Error starting at line 1 in command:
    select TO_DATE('fccpdate', 'DD-MON-YYYY') from cc_class_scmast_v where fccpdate IS NOT NULL
    Error report:
    SQL Error: ORA-01858: a non-numeric character was found where a numeric was expected
    01858. 00000 - "a non-numeric character was found where a numeric was expected"
    *Cause:    The input data to be converted using a date format model was
    incorrect. The input data did not contain a number where a number was
    required by the format model.
    *Action:   Fix the input data or the date format model to make sure the
    elements match in number and type. Then retry the operation.
    When I try to_char I get this:
    Error starting at line 1 in command:
    select TO_char('fccpdate', 'DD-MON-YYYY') from cc_class_scmast_v where fccpdate IS NOT NULL
    Error report:
    SQL Error: ORA-01722: invalid number
    01722. 00000 - "invalid number"
    *Cause:   
    *Action:
    I've tried removing the single quotes from my column and that doesn't make a difference. Any help is appreciated.

    Hi,
    housetiger77 wrote:
    I've converted date formats many times, but for some reason I'm getting an invalid number error when trying to convert a varchar2 column. I've tried the to_char and to_date function and I get the same result. The column is a date and it is formatted as DD-MON-YYYY,If the column is a DATE, then it has the same format that all DATEs have, which is nothing like 'DD-MON-YYYY'. Formats like that only apply to strings.
    Conversely, if it is formatted as 'DD-MON-YYY', then it is a string, not a DATE.
    but I want to change it to MM/DD/YYYY. My query is below:
    select to_date('fccpdate','MM/DD/YYYY')
    from cc_class_scmast_vTO_DATE (x, 'MM/DD/YYYY') tries to convert the string x into a DATE. Let's say it starts by taking the first 2 characters of x, to get the month. The first 2 charcters of 'fccpdate' are 'fc', which is not a valid number (at least not in base 10), let alone a number between 1 and 12, so TO_DATE raises an error.
    When I try to_date I get this:
    Error starting at line 1 in command:
    select TO_DATE('fccpdate', 'DD-MON-YYYY') from cc_class_scmast_v where fccpdate IS NOT NULL
    Error report:
    SQL Error: ORA-01858: a non-numeric character was found where a numeric was expected
    01858. 00000 - "a non-numeric character was found where a numeric was expected"
    *Cause:    The input data to be converted using a date format model was
    incorrect. The input data did not contain a number where a number was
    required by the format model.
    *Action:   Fix the input data or the date format model to make sure the
    elements match in number and type. Then retry the operation.
    When I try to_char I get this:
    Error starting at line 1 in command:
    select TO_char('fccpdate', 'DD-MON-YYYY') from cc_class_scmast_v where fccpdate IS NOT NULL
    Error report:
    SQL Error: ORA-01722: invalid number
    01722. 00000 - "invalid number"
    *Cause:   
    *Action:
    I've tried removing the single quotes from my column and that doesn't make a difference. Any help is appreciated.That's a good first step. Literals are enclosed in single-quotes, identifiers (including column names) are not. 'fccpdate' is the literal 8-character string containing 'f', 'c;, another 'c', 'p', 'd', 'a', 't' and 'e'. fccpdate (without single-quotes) can be the name of a column.
    If fccpdate is a string, such as '18-JUL-2012', then you can convert it to a DATE using TO_DATE.
    TO_DATE (fccpdate, 'DD-MON-YYYY')If you want to display a DATE in a particular format, use
    TO_CHAR ( d
            , f
            )where d is a DATE, and f is the format string. In this case, d might be the TO_DATE expression above
    TO_CHAR ( TO_DATE (fccpdate, 'DD-MON-YYYY')
            , 'MM/DD/YYYY'
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using.
    See the forum FAQ {message:id=9360002}

  • I am on windows 8 platform, i used adobe elements to work on my image - the output is in dng format, how do i convert this to jpg format?

    i am on windows 8 platform, i used adobe elements to work on my image - the output is in dng format, how do i convert this to jpg format?

    When you make a DNG that's like making another raw file, so you will need to convert the DNG file just like your original raw. Don't use the Save button in the raw converter. That's just a link to the DNG converter. Normally you would click Open instead and then save in the editor as a jpg or other image format of your choice.

  • How to upload a PDF file and convert it to OTF format

    We have come across rquirements like converting OTF to PDF but my requirement is to read a PDF file in SAP and convert it to OTF format for printing.
    Can anyone please help me with the Function Modules to do so.

    Hello,
    Try the following FM:
    CONVERT_OTF Convert SAP documents (SAPScript) to other types.
    Example:
    CALL FUNCTION "CONVERT_OTF"
    EXPORTING FORMAT = "PDF"
    IMPORTING BIN_FILESIZE = FILE_LEN
    TABLES OTF = OTFDATA
    LINES = PDFDATA
    EXCEPTIONS ERR_MAX_LINEWIDTH = 1
    ERR_FORMAT = 2
    ERR_CONV_NOT_POSSIBLE = 3
    OTHERS = 4.
    Hope this helps.
    Reward if helpful.
    Regards,
    Vasanth

  • Convert Char to Date format - Evaluate

    Hi,
    Could anyone provide us the Evaluate formula to convert Char to Date format
    2009-06-20 should be converted to 06/20/2009
    Regards,
    Vinay

    Hi,
    Refer the below threads...
    Re: How to convert string to date format?
    how to convert character string into date format????
    Regards,
    Chithra Saravanan

  • After Effects CS4 and converting to a lossless format

    I posted in the Adobe Premiere forums about an issue I was having with my renders. If you want to read it then you can check it out with the url below.
    http://forums.adobe.com/message/2622969#2622969
    What I have figured out is that After Effects does not like my AVCHD files I get from my camera. (They are h.264 in an ,m2ts file type and not mp4)
    The issue is that I get "echos" or skips when I render something in After Effects or render with Media Encoder via dynamic link and Premiere Pro CS4.
    What I am not familar with is the types of files that many of you who are more expereinced than I am use for After Effects when you need to convert to a lossless format (or one as close as you can get to being "lossless."
    I was wondering if someone could recommend the kinds of files I should be converting to and if you have a good method of converting them. Not that I want people to discuss other software here, but if you do not use Adobe programs to convert, then what kinds of files do you convert to?
    In other words, where do you recommend I begin reading or researching this because a lot of companies sell conversion programs. I currently have one that I paid for but it does not do the job I need it to do for HD. I would like to keep it as close to HD quality as possible.
    FYI I generally will do video work with some effects and green screen work in After Effects. My output is video. If you have any other questions about my process, then please do not hesitate to ask me. Other than that, I appreicate anyone's guidance.

    Yeah, AE does not like video files with interframe compression. It processes video in a completely different way than a non-linear editing program like Premiere does. My friend Dave LaRonde from the friendly forums at CreativeCOW.net explains it this way:
    If the footage you imported into AE is any kind of the following -- footage in an HDV acquisition codec, MPEG1, MPEG2, mp4, m2t, H.261 or H.264 -- you need to convert it to a different codec.
    These kinds of footage use temporal, or interframe compression. They have keyframes at regular intervals, containing complete frame information. However, the frames in between do NOT have complete information. Interframe codecs toss out duplicated information.
    In order to maintain peak rendering efficiency, AE needs complete information for each and every frame. But because these kinds of footage contain only partial information, AE freaks out, resulting in a wide variety of problems.
    You have experienced this delightful problem for yourself.
    There are several different file formats that people use. Uncompressed AVI is one as is Quicktime with the animation codec. However, lately folks seem to prefer Quicktime with the PNG codec (not a PNG sequence). It produces a significantly smaller file size, but is still effectively lossless.
    You can use the Adobe Media Encoder to export it out of Premiere to use in AE.

  • Can't convert .DV to any format in Quicktime

    Hi!
    I've recently created a movie project in iMovie and exported it to Quicktime, for it to keep it's full resolution. The problem is... the file measures about 1.09 Gb, for a 5:49 movie. I want to convert it to .avi to reduce it's size, maintain quality and play on YouTube, etc,; I've tried different specs but it always freezes! I've tried also converting it to different formats like Divx or .mp4 but with no luck at all. Any tips on how to fix this?

    First don't export to AVI there are enough horrible AVI's out there from Windows users to last until the 22nd century.
    You don't need to export it at all just open the reference file in QT and export how you like. You have said nothinga about how it doesn't work, error messages or anything at all to help so try doing that.
    DV is 13GB an hour so the size is simply a normal DV size for the duration you have there, and not a problem, and you may be happier opening it in MPEG Streamclip (free), and export to MPEG-4 with one of the iTunes presets.

  • I've uploaded 4 pdf documents. Now how do I convert them to Excel format?

    I've uploaded 4 pdf docs. Now how do I convert them to Excel format so I can manipulate the data?
    linda93790

    Hi linda93790,
    If you uploaded your files to http://cloud.acrobat.com, simply click on one of the PDF files, then click 'ExportPDF' from along the top-bar in your browser.  This will automatically load that PDF into the ExportPDF system.  From there, you can configure any options you may need and convert the file to an .xlsx file.
    Please let us know if you have any questions!
    Thanks,
    David

  • Converting String To XML Format and send as attachment

    Hi
    My requirement is to convert String into XML Format and that XML File i have to send as an attachment
    can any one one give solution for this Problem.
    Thank you
    Venkatesh.K

    hi,
    i m filling the itab first and converting to xml
    itab contaning these data
    GS_PERSON-CUST_ID   = '3'.
    GS_PERSON-FIRSTNAME = 'Bill'.
    GS_PERSON-LASTNAME  = 'Gates'.
    APPEND GS_PERSON TO GT_PERSON.
    GS_PERSON-CUST_ID   = '4'.
    GS_PERSON-FIRSTNAME = 'Frodo'.
    GS_PERSON-LASTNAME  = 'Baggins'.
    APPEND GS_PERSON TO GT_PERSON.
    after conversion data is coming like that
    #<?xml version="1.0" encoding="utf-16"?>
    <CUSTOMERS>
      <item>
        <customer_id>0003</customer_id>
        <first_name>Bill</first_name>
        <last_name>Gates</last_name>
      </item>
      <item>
        <customer_id>0004</customer_id>
        <first_name>Frodo</first_name>
        <last_name>Baggins</last_name>
      </item>
    </CUSTOMERS>
    but errors are  1) # is coming at the first
                            2)for 'encoding="utf-16"?>', it is not coming perfectly, some other data (iso-8859-1) should come here
    can anybody plz solve it.
    regards,
    viki

  • Converting string to XML format

    Hi All,
    I have a requirement to convert string to xml format and download it. Atpresent, I have a string which is a collection of xml tags. I want to convert this string to xml format like <VALUE004>20387899.437</VALUE004>
    <VALUE005>20387899.437</VALUE005>
    <VALUE006>20387899.437</VALUE006>
    Is there any function module for this.

    Chk this thread.
    Re: Regd: File Conversion to XML format

  • I need to know the best, safest way to convert video for Mac.  I just had home movies converted to a DVD format a realize now that I need another step to burn them to my computer.

    I just had home movies converted to a DVD format a realize now that I need another step to burn them to my computer.  This is for a Christmas present!  Help.

    I don't think you need to use a ripper program to read a home movie DVD. Those are primarily for copy-protected commercial DVDs, right?
    I think you just need to transcode the DVD files using a utility like Handbrake, which is free and fast.
    http://handbrake.fr/details.php

Maybe you are looking for

  • String field value convert into Date with validation

    Dear all, I need some help if someone can please? Actually I am getting date in string format as 20110315 or 20111025 or so on. I could use to date function for this for conversion but what if 20091432 which is wrong so I can hadle this. Actually I m

  • ActiveSync policies in Windows 8 Mail client

    I'm having an issue with ActiveSync policies remaining on Windows 8 machines after the corporate account they are coming from is removed from the mail client.  I have tried all ways of removing the account...remove in the app, delete from the server,

  • Override document preferences when opening a file

    Hi all Does anyone know if there is a way to override the document preferences with the InDesign preferences when opening a file (or even when a file is open). The issue i have is that I have a whole load of documents where for some reason the supers

  • FYI - installing a root certificate on E71

    FYI We run our own certificate authority for internal websites,  and have a page to download the root certificate in PEM format with the appropriate MIME type (application/x-x509-ca-cert). Clicking that in Firefox magically installs the certificate,

  • Need full main query to fetch Invoices for RAXINV.rdf

    Hello All, Please send me the complete query which fetches the Invoices for RAXINV.rdf. In standard query, it consists of lexical parameters. Need query without any lexical parameters. Please do the needful. Thanks, Abdul