Convert char to date format in obiee 11g?

Hello

I want to convert char to date format in obiee 11g.

I have this date

' 07/31 /' | CAST (YEAR (CURRENT_DATE) AS CHAR)

I want to change the tank to the date format.

Please help me,

Thanks in advance,

A.Kavya.

Below him is based on my date format NLS source Oracle database as DD-MON-RR (query on the database - SELECT * > OF nls_database_parameters WHERE the PARAMETER = "NLS_DATE_FORMAT").

Note that this is not altered by the connection of the RPD pool, which is common.

If the date that I put together for substrings and Casts a match before it can be LAUNCHED as a DATE. IE 31 July 15 etc.

Steps to follow:

-Drag a field to the report, one

-Change the formula

-Paste in

CAST ("31 - Jul -" |) SUBSTRING (CAST ('F_PL_BAL'. ' BUSINESS_DATE ' AS CHAR) FROM 8 TO 2) AS DATE).

-OK

-See the results

Tags: Business Intelligence

Similar Questions

  • Convert number to date format

    HI team,

    I have a problem, how we can convert number in date format?
    This is the result of the query.

    SQL > col START_TIME for 999999999999999999999999
    SQL > select start_time in qrtz_triggers;

    START_TIME
    -------------------------
    1364243906000
    1364589406000

    So, I have to change the date format niumber rto.

    My date format as for example: "" Mar 25,2013 20:36:45 ""


    Please suggest me...
    Thank you
    Chavigny

    Published by: 939938 on March 14, 2013 06:39

    This is the number of milliseconds since January 1, 1970.

    SQL> SELECT to_char(to_date('01/01/1970','mm/dd/yyyy')+1364243906000/24/60/60/1000
      2  ,'Mon dd, yyyy hh:mi:ss PM') FROM dual;
    
    TO_CHAR(TO_DATE('01/01/1970','
    ------------------------------
    Mar 25, 2013 08:38:26 PM
    

    So in your query instead of start_time use
    TO_CHAR (to_date (' 01/01/1970 ',' mm/DD/yyyy') + start_time/24/60/60/1000,' Mon DD, YYYY HH: mi: ss PM "")

    Published by: kendenny on March 14, 2013 08:31
    Had used mm instead of e for the minutes.

  • How to change the date format in OBIEE

    Hello

    I have a need to change the column to a column of varchar by OBIEE...

    The date column stores the data in the format "YYYY/MM/DD", I need to change that for a column of varchar with this format "YYYYMM"...

    Since I'm pointing directly to the transactional database, I can't make changes to the database level, so I have to do in OBIEE layer, of the ideas of how this could be done?

    Thanks in advance!

    Hi user,

    Reference: http://varanasisaichand.blogspot.com/2010/01/how-to-change-data-format-to-our-custom.html

    http://varanasisaichand.blogspot.com/2010/05/evaluate-function.html

    Thank you
    Saichand.v

  • Do not connect to a data source in obiee 11g

    Hi friends,

    I can't able to import metadata into a new repository in OBIEE 11 g...

    It does not connect to the data source to import meta data

    It throws error as the failure of the connection...

    I also restarted services and also checked for odbc connectivity that's showing the connection is
    success...

    Also, I entered the details in Notepad TNS...

    Here are the following details

    TEST =
    (DESCRIPTION =
    (ADDRESS =
    (PROTOCOL = TCP)
    (HOST = 172.16.1.110)
    (PORT = 1522)
    )
    (CONNECT_DATA =
    (SID = TEST)
    )
    )

    The data source name that gave me is ORCLBI for my reference...

    So why not connect not not at the data source... Help me friends for the importation of tables to my deposit as soon as it is connected to the data source...

    Thank you
    Harry...

    Hello
    Through Vincent response in this... Can help you... Re: unable to connect to the database of the OBIEE 11g improved SPR

    Kind regards
    Srikanth

  • Convert char to date

    I have a file name as final_20120928_142334.txt


    I need to retrieve only since that date the value as 20120928_142334

    so I have to convert it to format time date like yyyymmdd hh24:mi:ss

    This is my suggestion:

    Make your variables #VAR_CONTROL and #VAR_FILENAME types of TEXT data

    Update the SQL for #VAR_CONTROL is:
    SELECT TO_CHAR (TO_DATE (P_DATE, 'dd-mon-yy hh24.mi.ss'), "YYYY-MM-DD HH24:MI:SS") OF CONTROL

    Update the SQL for #VAR_FILENAME is:
    SELECT TO_CHAR (TO_DATE (substr (FILE_NAME, 7, 15), 'yyyymmdd_hh24miss'), "YYYY-MM-DD HH24:MI:SS") OF filename

    Your filter clause is then:
    ITEM_LOC. UPDATED_TABLE between to_date ('#VAR_CONTROL', ' ' YYYY-MM-DD HH24:MI:SS) and to_date ('#VAR_FILENAME', ' ' YYYY-MM-DD HH24:MI:SS)

  • Date format 11g BI Publisher

    I need to get the month of the date field.  Let's say that the domain name is date_from (May 24, 2014) in the table and it is of type Date. Firstly I formatted for to_char('24-MAY-2014','MON'), it gives 'MAY', then I need to convert to the date format.  Please advice how to get the format/month.

    Please mark answered the question.

  • varchar2 to the date format conversion

    I have converted the formats of date several times, but for some reason, I get an error invalid number when you try to convert a varchar2 column. I tried the to_char and to_date function and I get the same result. The column is a date and it is formatted like ME-DD-YYYY, but I want to change it to DD/MM/YYYY. My query is below:

    Select to_date('fccpdate','MM/DD/YYYY')
    of cc_class_scmast_v

    When I try to_date I get this:

    Error from the 1 in the command line:
    Select TO_DATE ('fccpdate ',' MON-DD-YYYY "") of cc_class_scmast_v, where fccpdate IS NOT NULL
    Error report:
    SQL error: ORA-01858: a non-digit character was found here where was waiting for a digital
    01858 00000 - "a non-digit character found here where was waiting for a digital".
    * Cause: Input data to convert using a date format model has been
    incorrect answer. The input data did not contain a number where is a number
    required by the format model.
    * Action: Fix the input data or the date format model to ensure that the
    elements correspond to the number and the type. And then try the operation again.



    When I try to_char I get this:

    Error from the 1 in the command line:
    Select TO_char ('fccpdate ',' MON-DD-YYYY "") of cc_class_scmast_v, where fccpdate IS NOT NULL
    Error report:
    SQL error: ORA-01722: invalid number
    01722 00000 - "invalid number."
    * Cause:
    * Action:


    I tried to remove the single quotes of my column and that does make a difference. Any help is appreciated.

    Hello

    housetiger77 wrote:
    I have converted the formats of date several times, but for some reason, I get an error invalid number when you try to convert a varchar2 column. I tried the to_char and to_date function and I get the same result. The column is a date and it is formatted like ME-DD-YYYY,

    If the column is a DATE, then it has the same format that all DATEs, which is nothing like 'DD-MON-YYYY '. Formats like which apply only to chains.
    Conversely, if it is in the format "DD-MON-YYY", then it is a string, not a DATE.

    but I want to change to DD/MM/YYYY. My query is below:

    Select to_date('fccpdate','MM/DD/YYYY')
    of cc_class_scmast_v

    To_date (x, "MM/DD/YYYY") tries to convert the string x in a DATE. Let's say it starts by taking the first 2 characters of x, for the month. The first 2 characters of 'fccpdate' are "fc", which is not a valid number (at least not in base 10), not to mention a number from 1 to 12, TO_DATE so will raise an error.

    When I try to_date I get this:

    Error from the 1 in the command line:
    Select TO_DATE ('fccpdate ',' MON-DD-YYYY "") of cc_class_scmast_v, where fccpdate IS NOT NULL
    Error report:
    SQL error: ORA-01858: a non-digit character was found here where was waiting for a digital
    01858 00000 - "a non-digit character found here where was waiting for a digital".
    * Cause: Input data to convert using a date format model has been
    incorrect answer. The input data did not contain a number where is a number
    required by the format model.
    * Action: Fix the input data or the date format model to ensure that the
    elements correspond to the number and the type. And then try the operation again.

    When I try to_char I get this:

    Error from the 1 in the command line:
    Select TO_char ('fccpdate ',' MON-DD-YYYY "") of cc_class_scmast_v, where fccpdate IS NOT NULL
    Error report:
    SQL error: ORA-01722: invalid number
    01722 00000 - "invalid number."
    * Cause:
    * Action:

    I tried to remove the single quotes of my column and that does make a difference. Any help is appreciated.

    It's a good first step. Literals are enclosed in single quotes are not identifiers (including the column names). "fccpdate" is the literal string of 8 characters containing 'f', ' c; Another 'c', 'p' 'd', 'a', 't' and 'e'. " fccpdate (without the single quotes) can be the name of a column.

    If fccpdate is a string, as July 18, 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 is perhaps the TO_DATE expression above

    TO_CHAR ( TO_DATE (fccpdate, 'DD-MON-YYYY')
            , 'MM/DD/YYYY'
            )
    

    I hope that answers your question.
    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and also publish outcomes from these data.
    Explain, using specific examples, how you get these results from these data.
    Always tell what version of Oracle you are using.
    See the FAQ forum {message identifier: = 9360002}

  • Date format custom that allows Obiee 11g

    Hello

    I'm new here,
    What are the date format can be used in OBIEE 11 g?
    We can custom like this: DD-MM-YYYY? is there any case like DD-MM-YYYY?

    Help, please

    Joe

    Published by: JoeSSI on March 1, 2012 20:32

    Hello
    Refer,

    http://docs.Oracle.com/CD/E23943_01/bi.1111/e10544/format.htm#i1030865

    Thank you

    Deva

  • Convert the Period_Name in GL_JE_Lines table to a date format and then come back year

    I'm working on a data model BI Publisher and I try to convert the Period_Name in GL_JE_Lines table to a date format and then return of the year.

    The sql below works in 11i, but I can't make it work in Fusion.

    to_char (to_date (l. )) period_name , ' MON-RR ' ),'YYYY')

    Any ideas?

    Hi Jennifer,.

    To_char (sysdate, 'DDMONYYYY') in BI Publisher does not return a correct results due NLS_DATE_FORMAT/DATE_LANGUAGE settings.

    According to the standards of the I18N, NLS_DATE_LANGUAGE in the database is still hardcoded to NUMERIC_DATE_LANGUAGE. NUMERIC_DATE_LANGUAGE 'MY' in a date format mask is an integer, so you see the correct value.

    You're not supposed to publish direct SQL with fixΘe format masks (unless it's some sort of canonical format used in internal processing, including the end-user will not be), you should return language digital date to the mid range and then make the formatting of y.

    Workaround

    Try adjusting the NLS_LANGUAGE in SQL data model to override formatting from of the

    Data base and values of the Session, for ex: select to_char (sysdate, 'MON-DD-YYYY', 'NLS_DATE_LANGUAGE = AMERICAN') of double;

    I got this Oracle support after lifting a SR.

    Thank you

    Rahul.

  • Date Format converting... Help, please

    Hello

    I have a date column in the table, which has two formats and the data type of the column is varchar2, how to convert them to a format.

    Example of data as below:

    1. 1 OCTOBER 12 12.00.00 AM

    2.02 / 11/2015 12.00.00 AM

    Help me please to convert them to the format (DD/MM/YYYY HH)

    Originally, you started with

    Example of data as below:

    1. 1 OCTOBER 12 12.00.00 AM

    2.02 / 11/2015 12.00.00 AM

    In your error report, it reads

    INSERT INTO TEST VALUES (11 NOVEMBER 14 09:26:25 "");

    INSERT INTO TEST VALUES ('2014-01-31 23:33:25 ');

    INSERT TEST VALUES (OCTOBER 14, 2014 05:44:55 ');

    While initially it was possible to establish a distinction between the formatted strings differently based on the occurrence of a hyphen in each case a dash, it is no longer possible with your examples of more recent data.

    In addition, your second line of input currently requires "HH24" to the address of the value of the time correctly.

    With the updated data and the General advice to store dates in DATE columns, you could try the long

    ALTER TABLE TEST ADD(ACTION_DATE_NEW DATE);
    UPDATE TEST SET ACTION_DATE_NEW = CASE
      WHEN LENGTH(ACTION_DATE) = 18 THEN TO_DATE(ACTION_DATE, 'DD-MON-YY HH24:MI:SS')
      WHEN LENGTH(ACTION_DATE) = 19 THEN TO_DATE(ACTION_DATE, 'YYYY-MM-DD HH24:MI:SS')
      WHEN LENGTH(ACTION_DATE) = 20 THEN TO_DATE(ACTION_DATE, 'DD-MON-YYYY HH24:MI:SS')
    END;
    COMMIT;
    

    and continue from there.

    See you soon

    Kirk

  • convert date format period

    Hi all

    Here are my existing query which I run another tool to extract data from oracle-

    Select * from transactionTbl

    WHERE

    DATE > = TO_DATE (' $(vAppStartDate)', "DD/MM/YYYY")

    AND DATE < = TO_DATE (' $(vAppEndDate)', "DD/MM/YYYY")

    variables-

    -vAppStartDate = 06/01/2014

    -vAppEndDate = 30/06/2015

    Rather than use the Date column in the WHERE condition, I want to use PeriodID of column existing in the same table, to make the query faster.

    The period column is in below format.

    PeriodID format-> 201294 //means 2012Q 4. So 9 means Q

    Since I'm on variables, the values are always to the date format, so my requirement is first change variable date from periods of format.

    I wrote the pseudo-code, because I of course know how to convert date format periodID. Q also means in the periodID 9.

    Select * from transactionTbl

    WHERE

    PeriodID > = period_function (TO_DATE (July 1, 14 ',' DD/MM/YYYY '), 'YYYYxx')

    AND PeriodID > = period_function (TO_DATE (July 1, 15 ',' DD/MM/YYYY '), 'YYYYxx')

    Please help me with the query.

    Thank you!

    Calling a user-defined function is likely to slow down your query.

    What's the problem with just using regular date formatting strings for example

    SQL > select to_char (to_date('15/09/2014','DD/MM/YYYY'), 'YYYY "9" Q') of double;
    TO_CHA
    ------
    201493

    1 selected line.

  • Date format OBIEE

    Hello everyone,

    When I connect to obiee with mode 'English' selected, I want to see the column data format date as "MM/DD/YYYY". However, the default behavior is "MM/DD/YYYY". How can I change? I don't want to change the format of data manually one by one. Can I change automatically?

    Kind regards

    Dilek

    Hello Dilek,

    I think it depends on the locale (scheme chosen under 'My account' in the corner right under your username). There you can choose the language for the interface as well as the locale.

    What version of OBIEE do you use?

    Best regards

    Pie

  • Convert the AM/PM chain to the legit Date format AM/PM

    Hello

    I would like to convert a string field, including a date (2014-02-11 07:13:14) in a legitimate date using the attribute 'string to date. ' Unfortunately, I can't turn these.

    I tried to add a new date format to the standard list.

    YYYY-MM-DD hh: mm: tt

    However, above was not accepted, and all dates cannot be converted.

    Thanks in advance for you help on this topic

    Hello

    Try to use the format string:

    YYYY-MM-DD hh: mm: one

    Kind regards

    Nick

  • Date format does not not in 11G?

    Hi all

    I'm using Oracle 11 g on windows 7

    I try to run this date format not allways show me same format

    Select To_date (' 02 / 02/2012 ', ' DD/MONTH/YYYY') twice; (when I want to record on column date) but the error is NOT VALID MONTH
    Select To_date (' 02 / 02/2012 ', ' DD/MM/YYYY') twice; (when I want to record on column date) it's OK



    Also, when I want to display the date
    Select To_char (' 02 / 02/2012 ', ' DD/MM/YYYY') twice; (when I want to record on column date) error NUMBER INVALID

    Select To_char (' 02 / 02/2012 ', ' DD/MONTH/YYYY') twice; (when I want to record on column date) error NUMBER INVALID
    Select To_char (' 02 / 02/2012 ',' MON/DD/YYYY "") double; (when I want to record on column date) error NUMBER INVALID

    I try to get NLS_DATE_FORMAT in windows registery under oracle but not found I have try to search in the registry, but not found.

    using regedit in cmd

    concerning

    Isabelle wrote:
    It's good, but I want the output like this JJ/MM/AAAA allways

    Date of some time

    09/12/2012
    12 OCTOBER 2012

    How can I give him standard format?... because the user enter different format, so I want to convert it to standard format.

    .

    with t as
    (
    select '12/09/2012' d from dual
    union all
    select '12/OCT/2012' from dual
    )
    select to_char(to_date(d,'dd-mm-rr'),'dd-mm-yyyy') d from t;
    
    D
    12-09-2012
    12-10-2012
    
  • How to convert Date format in the Apex?

    Hi all

    I created an element of Apex Date Picker as "yyyy-mm-dd", now when they select this date picker, that must be converted in "day, month, DD, YYYY".
    I trired like that but it does not work, can anyone help me to find things to do.

    Under article, we have free will.

    Default value: to_char (to_date (: P1_ENG_DATE, 'dd-mm-yyyy'), ' day, month DD, YYYY ")
    Deafult value as type - PL/Sql.

    Thanks,
    David...

    Hello

    You can set the date format level of application, then you don't need to specify the format each time.

    for this go to "Modify the Application Properties"-> globalization

    Here you can specify the format of date of application.

    Thank you
    Tauceef

Maybe you are looking for

  • Toshiba A50-frequency of 106:FSB Bus and memory problem

    HelloI have a problem with my new Toshiba A50-106. There are Celeron M 1, 5 GHz inside. That all specifications for this processor FSB speed should be 4x100MHz and for my memory bus speed should be 2 x 133, but when I check in SiSoft Sandra 2004 I se

  • upgrade 1309st g6 HP processors

    Hello I have 1309st computer laptop Hp Pavilion g6 I'm trying to processor upgrade. On computer laptop i3 2330 Mr. I need upgrade you i5 3230 m I checked my processors of this Web site. And CPU - Z http://www.CPU-world.com/Sockets/socket%20G2%20 (rPG

  • Satellite L750 does not illuminate

    Hello. I recently acquired a portable Satellite L750 who has a problem where it not light but annoyingly he teases me by working perfectly on rare occasions, it seems to me as if there is little hope for it. When I press the power button, the power l

  • Qosmio X 500-12 q - reader of fingerprints and the Webcam disconnects

    Hello I have a Toshiba Qosmio X 500-12 q since its release and I have a problem: the webcam and fingerprint reader disconnects all the time, I'm always having to reboot to reconnect. It is particularly troubling for the webcam. I hope to find a solut

  • Recognition of the party (spectrometer) driver standalone 3rd

    Hello I make the unattend file (excutable) to control the spectrometer in the developer's computer, but in the other pc. I made one independent and one for run-time machine to run the file in another computer that does not have the driver of the spec