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

Similar Messages

  • Source:Essbase, how to convert char in date format

    Hello
    Version OBI EE:10.1.3.4.1.090414.1900
    Source:Essbase
    We have date in format VARCHAR (01.01.2008). I want to have date in format DATE.
    I transform our date on Business Level in DATE (yyyy-mm-dd)
    CAST ( SUBSTRING(Copeck."Time"."Gen5,Time" FROM 7 FOR 4) || '-' || SUBSTRING(Copeck."Time"."Gen5,Time" FROM 4 FOR 2) || '-' || SUBSTRING(Copeck."Time"."Gen5,Time" FROM 1 FOR 2) AS DATE )
    And in Answers I can see our DATE in format DATE,
    but when I want to use filter on this field i get mistake
    HY000. Код: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] meaning date/time 2008-01-01 nonqualifying given format
    Состояние: HY000. Код: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] Возникла общая ошибка. [nQSError: 46046] Значение дата/время 2008-01-01 не соответствует заданному формату. (HY000)
    Сформированный SQL: SELECT Time."Дата начала4" saw_0 FROM Copeck WHERE Time."Дата начала4" = date '2008-01-01' ORDER BY saw_0
    When i use
    CAST ( SUBSTRING(Copeck."Time"."Gen5,Time" FROM 1 FOR 2) || SUBSTRING(Copeck."Time"."Gen5,Time" FROM 4 FOR 2) || SUBSTRING(Copeck."Time"."Gen5,Time" FROM 7 FOR 4) AS DATE ) - ddmmyyyy
    I can't see our DATE in format DATE in Answers, because I immediately get mistake
    When I use usual database, i don't have this mistake, may be it depends on Source date?

    I understand the converions for formatting dates. Thank you for this posting, it helped a lot. Now I need to take this one step further and that is modifying a date that comes the XML Datasource in the format I do not want.
    Start Date is the name of the field. It is in XML and my RTF as 2009/10/03 and I want 10/03/2009 or 03-Oct-2009.
    Any help on this is most appreciated.
    Thanks
    G

  • Convert Char to Date in SQL Server

    Hello Experts,
    I am trying to convert Char to Date but getting error in Universe designer. Can anybody advise please?
    Thanks,
    Ravi

    Hi,
    Try with CAST() and CONVERT() functions. For more information refer use this url : http://msdn.microsoft.com/en-us/library/ms187928.aspx.
    It is more easy to get solution if you can post your query.
    Cheers,
    Suresh Babu Aluri.

  • 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...

  • How to convert milliseconds to date format in sql query

    Hi All,
    The following code is in java.     
    String yourmilliseconds = "1316673707162";**
    Date resultdate = new Date(Long.parseLong(yourmilliseconds));
    could you plese tell me how to convert milliseconds into date format in query and comparing with another date like(sysdate-3)

    Hello,
    http://stackoverflow.com/questions/3820179/convert-epoch-to-date-in-sqlplus-oracle
    Regards

  • 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}

  • How to convert Milliseconds into Date format

    Hi all,
    I am getting the output of a variable in milliseconds format, how can I convert it into date format
    For ex: I am getting input variable as 1366664691000 and I need to convert it to April 22, 2013 5:04:51 PM EDT ( or of SOA format). is there any function for this in XSL or XPath?
    Thanks,

    It is working fine if i test it in provided site...
    But it is returning "-1366664691001", If i am running it in EM. This is the code in my xsl
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper
    <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
    <mapSources>
    <source type="WSDL">
    <schema location="../JavaProcess.wsdl"/>
    <rootElement name="process" namespace="http://xmlns.oracle.com/SampleApplication/JavaEmbeddingActivity/JavaProcess"/>
    </source>
    </mapSources>
    <mapTargets>
    <target type="WSDL">
    <schema location="../JavaProcess.wsdl"/>
    <rootElement name="processResponse" namespace="http://xmlns.oracle.com/SampleApplication/JavaEmbeddingActivity/JavaProcess"/>
    </target>
    </mapTargets>
    <!-- GENERATED BY ORACLE XSL MAPPER 11.1.1.4.0(build 110106.1932.5682) AT [TUE MAY 07 10:21:02 EDT 2013]. -->
    ?>
    <xsl:stylesheet version="1.0"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.MediatorExtnFunction"
    xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:med="http://schemas.oracle.com/mediator/xpath"
    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"
    xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:bpmn="http://schemas.oracle.com/bpm/xpath"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:socket="http://www.oracle.com/XSL/Transform/java/oracle.tip.adapter.socket.ProtocolTranslator"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
    xmlns:client="client"
    exclude-result-prefixes="xsi xsl bpws xp20 mhdr bpel oraext dvm hwf med ids bpm xdk xref bpmn ora socket ldap">
    <xsl:template match="/">
    <xsl:variable name="lastMTime" select="1366664691000"/>
    <xsl:copy-of select="$lastMTime"/>
    <client:processResponse>
    <client:result>
    <xsl:value-of select='xsd:dateTime("1970-01-01T00:00:00") + $lastMTime * xsd:dayTimeDuration("PT0.001S")'/>
    </client:result>
    </client:processResponse>
    </xsl:template>
    </xsl:stylesheet>

  • How to convert COLUMN_WID to date format mm/dd/yyy

    Hi Experts,
    How do I convert the COLUMN_WID (ex. 20121120) to date format mm/dd/yyy (ex. 11/20/2012) using the RPD in BMM Layer?
    Hope that I convey my questions clearly.
    Thanks,

    Hi,
    By Analysis:Go to edit analysis -->date(YYYYMMDD) column properties--->select Data format tab -->
    enable Override Default Data Format check box and select date format as "Custom" then
    Custom Date Formate mm/dd/yyy then test it
    Also you can do it via evaluate function (analysis/RPD)
    Thanks
    Deva

  • How to Converting Char to Date?

    Hi
    while i converting the char to date i am getting the below error, can some tell me how to resolve the issue.
    Datetime value 01/01/2011 from 01/01/2011 does not match the specified format. (HY000)
    SQL Issued: SELECT 0 s_0, CAST(CONCAT('01/01/',cast(year(current_date)as char)) as DATE) s_1 FROM ''example reports"

    Can you check whats your default date format. Just run the report with Current_date and look at whats the format. Ensure you dont override the default date format by going into column properties.
    Try applying the same format when you use the cast as date function.
    Also, you can refer to this link. http://gerardnico.com/wiki/dat/obiee/cast_as_date_
    Thanks

  • How to Convert Varchar2 to Date format(Timestamp)

    I have a date saved in varchar2 column.
    how can I convert the values into date(including Time stamp), so I can use the date to compare data.
    Ex: I have the value '20-03-2007 05:31:29', but this value is saved as varchar2.
    how can I take from this value the date '20-03-2007 05:31:29' as date format because later i need that date completely to add days, hours and minutes?

    SQL> create table dd (a varchar2(15));
    Table created.
    SQL>
    SQL>
    SQL> insert into dd values (sysdate);
    1 row created.
    SQL> insert into dd values (sysdate);
    1 row created.
    SQL> insert into dd values (sysdate);
    1 row created.
    SQL> insert into dd values (sysdate);
    1 row created.
    SQL> insert into dd values (sysdate);
    1 row created.
    SQL> insert into dd values (sysdate);
    1 row created.
    SQL>
    SQL> commit;
    Commit complete.
    SQL>
    SQL> select * from dd;
    A
    01-OCT-12
    01-OCT-12
    01-OCT-12
    01-OCT-12
    01-OCT-12
    01-OCT-12
    6 rows selected.
    SQL>
    SQL>
    SQL> select to_date(a,'dd-mon-yyyy') from dd;
    TO_DATE(A
    01-OCT-12
    01-OCT-12
    01-OCT-12
    01-OCT-12
    01-OCT-12
    01-OCT-12
    6 rows selected.
    SQL> select to_timestamp(to_date(a,'dd-mon-yyyy'),'dd mon yy hh24.mi.ss' ) from dd;
    TO_TIMESTAMP(TO_DATE(A,'DD-MON-YYYY'),'DDMONYYHH24.MI.SS')
    01-OCT-12 12.00.00 AM
    01-OCT-12 12.00.00 AM
    01-OCT-12 12.00.00 AM
    01-OCT-12 12.00.00 AM
    01-OCT-12 12.00.00 AM
    01-OCT-12 12.00.00 AM
    6 rows selected.
    SQL>
    that's it......

  • How to convert from ifs date format to sql based dates

    I want to write a sql query using dates, to search an ifs
    database. Ifs stores dates as numbers created using the
    java.util.Date class. These dates are accurate to seconds.
    PLSQL uses a different format.
    What I need is a PLSQL function that converts PLSQL date format
    to and from the java.util.date format.
    This is an example of what I would like to do.
    String classname = "DOCUMENT";
    String whereclause = "CREATEDATE > theNeededFuction(to_date('01-
    Jan-2001', 'DD-Mon-YYYY'),'j')";
    Selector mySelector = new Selector(login.getSession());
    mySelector.setSearchClassname(classname);
    mySelector.setSearchSelection(whereclause);
    I do realize that I could simply convert the date in java, but
    in the long run, I want to use the oracle tools that support
    busness day calulations.
    -Mitch

    Hi Mitch - our ViewSpecification functionality automatically
    includes an Oracle Date column, which is derived from the java
    date values we store. These views are the supported way of
    performing read-only operations against an iFS instance.
    For yor reference, the Oracle date column is derived using the
    following SQL operation (e.g. for createdate):
    to_date('01-JAN-1970', 'DD-MON-YYYY') + (createdate/86400000)
    regards,
    dave

  • How to convert string to date format?

    Hi All,
    String is in following format: 2006-12-07 i.e yyyy-mm-dd
    I want it in 07.12.2006 date format.
    which function module should i used to convert it?
    Regards,
    Nilima

    an other way to do this :
    Code
    DATA :
    ld_text(20) TYPE c,
    ld_date TYPE datum.
    ld_text = '2006-12-07'.
    REPLACE ALL OCCURENCES OF '-' IN ld_text WITH ''.
    WRITE ld_text TO ld_date.
    WRITE ld_date.

  • Convert the current date format.

    Hi All,
    I am working on database 11g. My nls_data_format is 'DD/MM/YYYY'.
    SQL> SELECT SYSDATE FROM DUAL;
    SYSDATE
    21-04-2009
    I would like to get the data format as 'MM/DD/YYYY'. I am using the to_date function but getting the error.
    SELECT TO_DATE(SYSDATE,'MM-DD-YYYY') FROM DUAL; Also after adding the to_char I am not getting the correct data format. Could any one suggest how I can get the data in correct format.? Also I changed the nls_date_format, still getting the same date formt.
    Thanks
    SUN

    User SUN@ wrote:
    Thank you for your replay.
    I want in date mode, not in charector, because after that I am doing calculation on these dates.
    Thanks
    SUNSo, don't worry about the format!
    If you've got a date that's in DATE format, you don't need to worry about what that format is; it's purely internal to Oracle. Since we're not an Oracle database, any time we refer to a date, we do so as a string (eg. 20th April 2009, 20/04/2009, etc). Any time Oracle outputs a date to us, it must convert the date into a string so us humans can understand it - it does this either through the explicit to_char() function that we specify or implicitly according to the nls_date_format parameter.
    So, you only need to worry about formatting dates:
    a) when you convert a date-as-a-string to Oracle's DATE format (eg. to_date('01/01/2009', 'dd/mm/yyyy') )
    b) when you're displaying a date (eg. to_char(sysdate, 'dd/mm/yyyy') )
    If you're manipulating dates, you can leave them in the same format: eg, sysdate + 2, add_months(your_date_col, 3), trunc(your_date_col), etc

  • Converting the char into date format?

    Hi!!! Guru's
       i am using std DS of SD 2LIS_11_VAITM, in that the date fields are in the the char format, so i wann show the difference of the to dates in Days into the report, can any body put some light on this thread.
    wil assign pts for sure
    thanks in adv
    mohan

    Hello,
    I think u can achieve this at query level.
    You can try variable with replacement path . In your scenario you will have to have 2 variables one for ex. 0SHIPDATE and another one for ex. 0GIDATE .
    After that create formula ( Number of days ) of subtraction on this two variables .
    Gimme ur mail-id , i will forward a doc on this if u want...
    Regards,
    SRIKANTH
    Message was edited by:
            KANTH SRI

Maybe you are looking for

  • ASM instance deletion and converting to RAC

    My RAC setup is little complex, i created 2 RAC servers, after that i created 2 new RAC servers, but the shared disk is same, in old RAC i created RAC ASM, which is running fine, in new i make want to create new RAC ASM instance, but when i got to db

  • Flash Player Updater 11

    I have got a Trojan Downloder JQAC in FlasPlayer Updater, I have uninstall Flash Player in the programs but I can't uninstall in Windows\system32\macromed\Flash, what can I do to eradicate this Trojan, thank you for your answer

  • CAS admin password recovery

    I am looking for help doing a password reset for the web admin password for a CAS server, I have the root password and can login into the CLI fine, but I can not access the web interface.

  • HT4528 need help with i phone 4 update and restore

    When i was at dinner tpnight my i phone lockrd up and now it says activate and i cannot get to settings menu

  • TS1398 will not join with router

    just got ipad out of box. tried connecting to my router but would not join only says, dismiss. standing next to router so no probs with signal strength. lap top and notepad connect wirelessly okay and i have checked security code stamped on the route