Converting to a date string

I am running the following select statement into Oracle SQL Developer.
Select I_NOTE_DESIGS.END_DATE AS ENDDATE
However in my results the date hows as 01-APR-29.
I was wondering if there is a way to convert this over to another date string ie: I would like the date in this column to show 2029-04-01. I am not bothered if the time comes out at the end, as I have a program which can delete that.
Regards,
Jon Ditchfield

>
Hi Jon, and welcome to the forums.
I was wondering if there is a way to convert this over to another date
string ie: I would like the date in this column to show 2029-04-01.
I am not bothered if the time comes out at the end, as I have a program which can delete that.select to_char(to_date('01-APR-29', 'dd-MON-YY'), 'yyyy-mm-dd') from dual;
select to_char(to_date('01-APR-29', 'dd-MON-YY'), 'yyyy-mm-dd hh:mm:ss') from dual;
Please be sure to read the forum FAQ. Also, read the "sticky" thread by BluShadow at the
top of the list of posts on the forum home page.
Always give your version of Oracle - the answer can vary greatly with version - although
not in this case.
These forums are a great resource - you will get the maximum benefit from them
if you follow the guidelines.
HTH,
Paul...
Jon Ditchfield

Similar Messages

  • How to convert server specific date string into client specific date object

    Hi developers,
    I have a very complex issue to convert the server date string format "EEE MMM dd HH:mm:ss z yyyy" into java.util.Date object and find the difference of the client machine date to represent the elapsed time
    The problem is the server time zone and client time zone are not unique and when I try to covert the server date which is in string format to date format using SimpleDateFormat class , I got the server time as 3:30 hours appended to it. The server time zone is in IST and Client time zone format is GMT+5:30 , the appended time of 3:30 hours created the confusion in calculating the elapsed time between the server started time and client requested time
    I went through all the sites but none of them were useful
    If any help to solve the above issue is appriciated
    please send the response with the same subject line
    Advance Thanks

    Why don't you just subtract from the server time the 3:30 hours (consult api of java.util.date) before comparing with the client date? Hard to see where's the problem...

  • How can I convert output data (string?) from GPIB-read to an 1D array?

    Hello all,
    I am reading a displayed waveform from my Tektronix Oscilloscope (TDS3032) via the GPIB Read VI. The format of the waveform data is: positive integer data-point representation with the most significant byte transferred first (2 bytes per data point).
    The output data of GPIB-Read looks like a string(?) where the integer numbers and a sign like the euro-currency sign are seperated by spaces e.g. #5200004C3 4 4 4 4 3C3C3........ (C represents the euro-currency sign).
    How can I convert this waveform data into a 1D/2D array of real double floatingpoint numbers (DBL) so I can handle the waveform data for data-analysis?
    It would be very nice if someone know the solution for this.
    t
    hanks

    Hi,
    First of all, I'm assuming you are using LabVIEW.
    The first you need to do is parse the string returned by the instrument. In this case you need to search for the known symbols in the string (like the euro sign) and chop the string to get the numeric strings. Here are some examples on parsing from www.ni.com:
    Keyword Search: parsing
    Once you parse the numeric strings you can use the "String/number conversion VIs" in the String pallette.
    Hope this helps.
    DiegoF.Message Edited by Molly K on 02-18-2005 11:01 PM

  • Converting hexadecimal XML data to a string

    Hello!
    Until now I generated XML data with the FM 'SDIXML_DOM_TO_XML'.
    After that I did a loop over the xml_as_table in which I was casting each line of that table to a string.
    ASSIGN <line> TO <line_c> CASTING.
    After the inftroduction of unicode in our system I get a error:
    In the current program an error occured when setting the field symbol <LINE_C> with ASSIGN or ASSIGNING (maybe in combination with the CASTING addition).
    When converting the base entry of the field symbol <LINE_C> (number in base table: 32776), it was found that the target type requests a memory alignment of 2
    What does it mean? Does somebody have a solution.
    I need this function for sending this XML data as string over a simple old CPIC connection.
    Best regards
    Martin

    Hello Martin
    Perhaps my sample report ZUS_SDN_XML_XSTRING_TO_STRING provides a solution for your problem.
    *& Report  ZUS_SDN_XML_XSTRING_TO_STRING
    *& Thread: Converting hexadecimal XML data to a string
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1029652"></a>
    REPORT  zus_sdn_xml_xstring_to_string.
    *-- data
    *-- read the XML document from the frontend machine
    TYPES: BEGIN OF xml_line,
            data(256) TYPE x,
          END OF xml_line.
    DATA: xml_table TYPE TABLE OF xml_line.
    DATA: go_xml_doc       TYPE REF TO cl_xml_document,
          gd_xml_string    TYPE string,
          gd_rc            TYPE i.
    PARAMETERS:
      p_file  TYPE localfile  DEFAULT 'C:payload_idoc.xml'.
    START-OF-SELECTION.
      CREATE OBJECT go_xml_doc.
      " Load XML file from PC and get XML itab
      CALL METHOD go_xml_doc->import_from_file
        EXPORTING
          filename = p_file
        RECEIVING
          retcode  = gd_rc.
      CALL METHOD go_xml_doc->get_as_table
        IMPORTING
          table   = xml_table
    *      size    =
    *      retcode =
    " NOTE: simulate creation of XML itab
      go_xml_doc->display( ).
      create object go_xml_doc.
      CALL METHOD go_xml_doc->parse_table
        EXPORTING
          table   = xml_table
    *      size    = 0
        receiving
          retcode = gd_rc.
      CALL METHOD go_xml_doc->render_2_string
    *    EXPORTING
    *      pretty_print = 'X'
        IMPORTING
          retcode      = gd_rc
          stream       = gd_xml_string
    *      size         =
      write: / gd_xml_string.
    END-OF-SELECTION.
    Regards
      Uwe

  • Converting part of the string to a date and subtract with sysdate.

    HINT! In order solve this you must know how the pnr is assembled. Study this:
    650323-5510, we only need the first six characters. They inform us about when the person (car owner) was born. In this case it is 23 Mars 1965. You have to use several oracle built-in-functions to solve this. Hint! Begin by converting part of the string to a date and subtract with sysdate.
    select to_char(to_date(cast(pnr,'YYMMDDMM'))) from car_owner;
    please what am i doing wrong. i need the result to be something like this
    Hans, Rosenboll, 59,6 years.

    Hi.
    The main problem here is you have only last two digits of year. That could be the problem in a couple of years from now, when somebody born after 2k would get in to your database. For now if we ignore this problem the right solution would be :
    <code>
    SELECT months_between(trunc(SYSDATE),
    to_date('19' || substr('650323-5510',
    1,
    6),
    'YYYYMMDD')) / 12 years_old
    FROM dual
    </code>
    Suppose you are expecting the age of the car owner as a result above code will give you that. One again notice the '19' I appended.
    Best regards.

  • How to convert an xml data(clob) in database to string format in bpel??

    Now I am learning SOA ,I have one scenario which I store the each record  in xml format in database  from file adapter ,extract the xml data and store the data in another  table ...Give me any suggestions which I slove these issue .
    Thanks in advance.

    Hi
    You can try the below xpath function to convert the xml into string - orcl:get-content-as-string(/xsdLocal:SAPOrderRequest)
    To convert the string back to XML - ora:parseEscapedXML(bpws:getVariableData('stringpayloadVar'))
    Regards
    Albin I

  • Converting any date string to GMT standard

    Hi All,
    I want to convert any date string to GMT standard.
    The date string may be like this.
    "Sat Sep 15 14:23:40 IST 2001"
    I have tried to change my defaultTimeZone .
    But I don't know why it's not working.
    Is there something to do with Locals?
    Can anyone please tell me the way to
    accomplish that ?
    Thanks in advance.
    Sujoy

    Java stores all the dates in GMT Format , considering the machines TimeZone Setting ....and also i guess date has methods like toGMTString() and toLocaleString() . To convert the date to GMT i guess u can just say toGMTString() of the date . If u have the stringified version of date
    just make a new Date(String) and then calling toGMTString of it .

  • Converting date strings

    I have a date string in the format "14/11/2003 16:13:56" and I need to convert it to another string in format "2003-14-11" how can I do it?
    I've tried the DateFormat and SimpleDateFormat classes but I can't manage to make it work.
    Thanks in advance.

    thanks TimTheEnchantor, that worked fine.
    Here's the code in case someone else needs it:
            String date="05/11/2003 15:22:19";
            Date convDate;
            SimpleDateFormat formatterIn;
            SimpleDateFormat formatterOut;
            try {
            formatterIn = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
            convDate=formatterIn.parse(date);
            formatterOut = new SimpleDateFormat("yyyy-dd-MM");
            date=formatterOut.format(convDate);
            } catch (Exception e) {
                date = "";
            }

  • How to convert a dynamic data type to array of strings

        I want to perform a serial communication between two
    computers that I´ll call them A and B. The computer A (transmitter)
    will send a signal (sinusoidal) to computer B (receiver). I´m using a
    VISA Serial Communications Set (VISA Configure Serial Port.vi, VISA
    Write.vi, VISA Read.vi and VISA Close.vi).  VISA Write accepts
    only string data type and VISA Read reads only string data type, but
    the signal that I generated (on transmitter) is dynamic data and I need
    to perform this conversion to run my program sucessfully. How can I
    perform this conversion?!

    Hi Rafael,
    You can configure the From DDT Express VI to convert your dynamic data to any number of different types.  By default, the Express VI will convert to a 1D array of numerics...however, you can configure it (either when you first drop it, or by double-clicking it) to convert to a 2D array of numerics...additionally, you can configure it to convert based on channel data being in columns or rows.  I have attached another screenshot that shows converting the dynamic data into a 2D numeric array. 
    I hope this helps.
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman
    Attachments:
    FromDDT2D.jpg ‏164 KB

  • Converting Date Strings to Months

    I need to know how I can convert a Date String to a Month.
    For example, my Date String is 2/19/09, I need this converted to return February.   I need one formula which will take in account for all months.
    I am currently using the following to convert to a date, but I'm not sure how to then convert this to return a month... January - December.
    CStr({?EndDate},"yyyy-MM-dd")
    Thank you in advance for your assistance.

    Thank you so much, this does give me the month.
    How can I use this to group my report by month and then under it by received date?
    For example...
    February
        2/1/09     Ticket information.....
        2/2/09     Ticket information.....
        2/18/09   Ticket information....
    March
        3/1/09     Ticket information.....
        3/2/09     Ticket information.....
        3/18/09   Ticket information....
    And so on....
    Thanks again in advance.
    Edited by: Gary Timm on Feb 19, 2009 6:02 PM

  • How do I convert an 8 bit serial data string I have received (say 01110101) into decimal format??

    I am having a hard time finding a function that will help me convert an 8 bit serial data string I have received (say 01110101) into decimal format.

    When you have your front panel displayed, you should a whole palette of controls that you can place on the front panel. If the palette is not displayed, thne just right click on your mouse and it should appear. The upper left most set of controls on the palette is Numeric. Go there and select Numeric Indicator to display a numeric output. On the diagram, you can also right click the output 1 and select Create>Indicator. The format string is %b (as in boy) for a binary string. As I said, this should be the value for the format string input. You can right click on the Scan From String and select Edit Scan String. This will bring up a dialog box in which you pick what you want to do (Scan Number) and how you want to do it (Scan Binary Integer
    It sounds like you really need to take a course in LabVIEW programming. There are are links here to NI classes and some on-line tutorials.

  • 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

  • ERROR [HY000] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Invalid date string (7497) (pgoe1022.dll)

    I am selecting data from a Progress database using the Data Direct Open Edge 10.1.B driver. The target table stores the date values as varchar in this format "22-OCT-14" In the select statement I can use Progress statements or T-SQL to transform
    the varchar to a date - but cannot do the same in the WHERE clause 
    Select po_number, cast(po_date as date) as [po_date] from [po_table] 
    (no problem - the [po_date] field stored as "22-OCT-14" is returned as "2014-10-22 00:00:00"
    but when I include the cast in the where clause I get the error described in the title
    Select [po_number], [po_date] from [po_table WHERE cast([po_date] as date)<= '10/22/2014' - NO GOOD
    I have tried very many combinations of the date string format , different functions and sub-queries but cannot find an answer

    The sql strings I posted are working examples - I've tried the ISO format you included - any number of date formats will work when the target field is a "Date" field - but trying any kind of transform statment to processa date stored
    as a varchar in the WHERE CLAUSE throws the erro
    Storing dates in a varchar column is a bad idea on any platform. Apparently there are strings in that column which cannot be converted to dates.
    On SQL Server you could have found this with
    SELECT po_date FROM po_table WHERE isdate(po_date) = 1
    What you should use on Progress, I have no idea.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Converting Java.util date to XML date in format YYYY-MMM-dd

    I'm using below code to convert java.util.date to XML date
    public static XMLGregorianCalendar toXMLDate(Date dte) {
       try {
       // this may throw DatatypeConfigurationException
       DatatypeFactory datatypeFactory = DatatypeFactory.newInstance();
       GregorianCalendar calendar = new GregorianCalendar();
       // reset all fields
      calendar.clear();
       Calendar parsedCalendar = Calendar.getInstance();
      parsedCalendar.setTime(dte);
      calendar.set( parsedCalendar.get(Calendar.YEAR ),
      parsedCalendar.get(Calendar.MONTH),
      parsedCalendar.get(Calendar.DATE ));
       XMLGregorianCalendar xmlCalendar = datatypeFactory.newXMLGregorianCalendar( calendar );
      xmlCalendar.setTimezone( DatatypeConstants.FIELD_UNDEFINED );
      xmlCalendar.setFractionalSecond( null );
       return xmlCalendar;
    I need to get the date in the format YYYY-MMM-dd, but it returns in a format YYYY-MM-dd. Can anyone tell me how can i change the format? Thanks

    >
    The snippet of ApplicationClient where the assignment took place and the syntax occurred were:
    1. DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
    2. DateFormat timeFormat = new SimpleDateFormat("HH:mm:ss");
    3. Date date = new Date();
    4. CustomerDetail customerDetail = new CustomerDetail();
    5. customerDetail.setCollectionDate(dateFormat.format(date)); //got the above syntax error
    6. customerDetail.setCollectionTime(timeFormat.format(date)); //got the above syntax error
    .....I am running JDK 1.6.0_10, Glassfish v2r2, MySQL 5.0, Netbeans 6.1 on Windows XP platform.The format method returns a String not a Date. Why not just store the Date as is without formatting, and format it when you want to retrieve it from the DB and display it?
    m

  • 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

Maybe you are looking for

  • How should inheritance of permissions on AD behave?

    Hi Forum members, I am not an AD expert in fact far from it. We have an in house software and we have used Active Directory to authenticate NT accounts to login to our application. In our application we can configure/setup AD groups in such a way tha

  • Unable to install Snow Leopard to a brand new Macbook Pro

    I have a new MB Pro that I'm unable to install 10.6.3 onto. This is a machine I got for work, and it has a corporate image on it. I thought I'd be able to create an additional partition on the hard drive and do a fresh install of 10.6.3 on it. If I j

  • Interface scenario: idocs from r/3 to XI

    Business Scenario is as follows: 1. We,the client, is R/3 and would post IDOCS forward. 2. These would go to XI/PI platform, which would send it forward as idoc xml or idoc it thru to XGS (EDI handling system,optional i.e. only in certain cases) towa

  • Change to Braille font in TextEdit

    I was thrilled to find that FontBook already has a very comprehensive Braille font on board, but less thrilled to find that I can't get TextEdit to play nicely and actually use it. The only way I've found to actually enter Braille characters in TextE

  • File Upload UI not Working

    Hi all, I am using File Upload UI for one my application, for that i created a context attribute of type com.sap.ide.webdynpro.uielementdefinitions.Resource , i placed one button which has the action whether any file was selected or not. public void