Format date prompt

how can i format a date for end-users in sql plus prompt statements?
example: accept xlll prompt 'enter begin date as 99/99/99:99:99 :'
i am using 24hour clock here. example: 20020108000001
thanks
Lorenzo

this didn't work. my database stores date field: 20020101000001 for example. I guess what i am trying to do is create a template for example. upon prompt, "2000/01/01:15:00". can this be done in sql scripts?
thanks in advance for any help.
Lorenzo
how can i format a date for end-users in sql plus prompt statements?
example: accept xlll prompt 'enter begin date as 99/99/99:99:99 :'
i am using 24hour clock here. example: 20020108000001
thanks
Lorenzo

Similar Messages

  • Date prompt to displayed in header&Format date format in header MM/DD/YYYY

    we have a date prompt. Based on the date selection on prompt, it has to be appeared on the Report header. Actually RELEASED_DATE is timestamp format. we need to format this to dispaly only MM/DD/YYYY format in Report header section.
    Report Name : <?$RELEASED_DATE?>
    We are displaying the same RELEASED_DATE with timestamp in Report section
    <?param@begin:CRSU_RELEASED_DATE?>

    can you paste the timestamp being displayed?
    You can use, format-date function or other, but its all based on the data you have for DATE.

  • OBIEE date prompt format yyyy-mm-dd

    Dear All,
    We did migration from obi 10g to 11g (version 11.1.1.7.0) .
    I have troubles with conversion of date prompt:
    My date format is dd.MM.yyyy, but when I pass date prompt into sql it is in format YYYY-MM-DD.
    How can I change that my date prompt will always stay in format dd.mm.yyyy?

    Hi,
    There are couple of ways we can do the date format.
    Please refer my blog.I have provided step by step implementation with screenshots.
    http://satyaobieesolutions.blogspot.in/2013/06/dateformat-converting-using-evaluate.html
    http://satyaobieesolutions.blogspot.in/2013/06/date-format-change.html
    1. Using evaluate function we can modify the format.
    ex:
    USING EVALUATE
    cast(Evaluate('to_char(%1,%2)',"Inventory"."Catalog"."dbo"."Dim_W_DAY_D_Inv_Unallocated_Run_Month"."CALENDAR_DATE",'YYYYMon') as varchar(10))
    or,
    cast(Evaluate('to_char(%1,%2)',<<COLUMN HERE>>,'YYYY-Mon') as varchar(10))
    2. Open your report then click column properties then select Data format then select custom then here you can put which format you want.
    Hope this help's
    Thanks,
    Satya Ranki Reddy

  • Issue with Date prompt Format

    Hi Guys,
    help me..pls
    i have created one date prompt with calendar input, the date format in that prompt is like '03/15/2013' but i need to show the date format like '2013-03-15' . when i try to convert the date format, the user input calendar popup is not enabling only text box is appearing to give date input.
    can any one guide me any work around..pls

    Hello,
    Check this one : http://obiee10grevisited.blogspot.com/2012/02/customizing-obiee-calendar-display.html
    Mark if helps.
    Thanks,
    SVS

  • Localdefinitions.xml and format date for Calendar Prompt

    HI!
    1. I change in localdefinitions.xml all dateformats for my locale
    2. I restarted my BI
    3. no effects
    why?

    yes, I restarted presentation server and oc4j.
    but has no effects.
    date prompt has strange behaviour...
    for Administrator user
    in English locale
    default format YYYY-MM-DD
    after change date by calendar, it has M.D.YYYY format
    in my locale
    default format YYYY-MM-DD
    after change date by calendar, it has YYYY.M.D format
    for other users
    in English locale
    default format YYYY-MM-DD
    after change date by calendar, it has YYYY.M.D format
    in my locale
    default format YYYY-MM-DD
    after change date by calendar, it has YYYY.M.D format

  • Change format date for Calendar Prompt!!!

    Hello there,
    For a date prompt when I choose *"Calendar"* in my control, the default format shown by the calendar is d/mm/yyyy.
    I want to save the value of my date prompt into a Presentation variable with the format yyyy-mm-dd. What conversion function can be used to achieve this?. In oracle the easiest way is TO_CHAR(dateHere,'YYYY-MM-DD') but when I apply this in the Edit Formula of the prompt it gives me an error.
    I know the date format for a Calendar object can be changed in the configuration file, but I want to avoid this, because I might affect other users.
    Please help.
    Thanks
    Edited by: PabloC2 on Feb 18, 2009 1:36 PM

    yes, I restarted presentation server and oc4j.
    but has no effects.
    date prompt has strange behaviour...
    for Administrator user
    in English locale
    default format YYYY-MM-DD
    after change date by calendar, it has M.D.YYYY format
    in my locale
    default format YYYY-MM-DD
    after change date by calendar, it has YYYY.M.D format
    for other users
    in English locale
    default format YYYY-MM-DD
    after change date by calendar, it has YYYY.M.D format
    in my locale
    default format YYYY-MM-DD
    after change date by calendar, it has YYYY.M.D format

  • Change Webi Date Prompt Format

    Hi
    In BEx, I've created a variable on a date object.  Processing is manual/default. Single value.  Optional.  And ready for input.
    In the Universe Designer, I have changed the "Where" code on the filter to be a date format with a free selection - as below.
    <FILTER KEY="[!V000006]"><CONDITION OPERATORCONDITION="Equal"><CONSTANT TECH_NAME="@Prompt('Valid Date From','D',,mono,free)"/></CONDITION></FILTER>
    When I refresh the document in Webi, when entering a date for the prompt, the format is M/d/yyyy.
    I would like to change this to dd.MM.yyyy - as this is what the users are used to when running queries in web templates.
    Where do I set the format for the Date prompt?
    We are on BO XI3.1 and SAP BW 7.0 on a DB2 database.
    Thanks in advance
    Anton
    Edited by: Anton Vogel on Jul 21, 2011 3:36 PM

    Hi
    It does.  But this can be a hassle when having to choose a date quite far in the past.  It is far more convenient to simply manually input a date.

  • How to handle date prompt in report

    Hi I have date column on database as timestamp.
    Now need to apply filter in report based on date prompt.
    Do i nee to cast it in Date format..or how i can do it.
    thanks,

    Hi User,
    Which versionof obiee are you in? If you are on 10.1.3.4.1 version, apply PATCH 9492821 to fix this issue.
    Can you do the following checks,
    In the repository physical layer, set the column to have a data type of date
    In the BMM layer, where the column is mapped, edit the column mapping to contain a CAST function to cast as date
    Regards,
    Dpka

  • Date prompt in obiee

    Hi Gurus,
    Prompt Name(date) =13-sep-10
    table name -test1
    requirement is to once i select the date from Date prompt let us say 13-sep-10 so it should select all the data after that date
    so should be query for the same in prompt SQL
    please help
    thanks

    TimestampDiff and TimestampADD( Difference of two dates) in OBIEE
    How to get a difference between two dates (in terms ) of days,weeks,months what every it may be
    The below formula gives you no.of days between day date and current_Date
    Days difference:
    TIMESTAMPDIFF(SQL_TSI_DAY, Time."Day Date",CURRENT_DATE)
    The below formula gives you no.of months day date and current_Date
    Months difference:
    TIMESTAMPDIFF(SQL_TSI_MONTH, Time."Day Date",CURRENT_DATE)
    The below formula adds months to day date column
    Toadd 12 months to a date column:
    TIMESTAMPADD(SQL_TSI_MONTH, 12,Time."Day Date")
    similarly we can write the formulas using different intervals based on the date format in the column
    Here are the intervals :
    SQL_TSI_SECOND,
    SQL_TSI_MINUTE,
    SQL_TSI_HOUR,
    SQL_TSI_DAY,
    SQL_TSI_WEEK,
    SQL_TSI_MONTH,
    SQL_TSI_QUARTER,
    SQL_TSI_YEAR.

  • Getting an error - with date prompt

    Hi,
    I really need a help to resolve this issue -
    I have created a date prompt As of date with presentation variable name CPG_CASH_DATE.
    I have use this variable in different number columns - Amount Due Original , Amount Applied , Amount Due Remaining.
    Inside the amount due original the function is CASE WHEN "Fact - CPG AR Payment Schedules"."Due Date" <=CAST(CAST(substring(('@{CPG_CASH_DATE}'),1,4)||'/'||substring(('@{CPG_CASH_DATE}'),6,2)||'/'||substring(('@{CPG_CASH_DATE}'),9,2)||' 00:00:00' AS CHAR) AS DATE) THEN ifnull("Fact - CPG AR Payment Schedules"."Amount Due Original",0) ELSE 0 END
    Inside the amount applied the function is CASE WHEN "Fact - CPG AR Payment Schedules"."Due Date" <=CAST(CAST(substring(('@{CPG_CASH_DATE}'),1,4)||'/'||substring(('@{CPG_CASH_DATE}'),6,2)||'/'||substring(('@{CPG_CASH_DATE}'),9,2)||' 00:00:00' AS CHAR) AS DATE) THEN ifnull("Fact - CPG AR Payment Schedules"."Amount Applied",0) ELSE 0 END
    Sometimes it is working -but now I am getting below error.
    Oracle Error code: 1861, message: ORA-01861: message: ORA-01861: literal does not match format string
    at OCI call OCIStmtExecute:
    Please help me to resolve this issue.
    Poojak

    Poojak,
    This is a common error when attempting CAST to dates. I've resolved this in the past using Gerad's post here, http://gerardnico.com/wiki/dat/obiee/cast_as_date
    I'm not sure why you are getting thie inconsistency when you say it was "sometimes" working and now it is not. Perhaps you've been in iterative develpment and changed a few things which broke something here.
    Take a look at Gerad's notes that this will resolve your issue.
    Please awards points if this helps or answers your question.
    Cheers,
    Christian
    http://www.artofbi.com

  • Date Prompts

    Hi,
    I am trying to create a date prompt
    Field - Service Date
    Data type - Date dd/mm/yyyy
    I would like the date prompt to be <= Service Date in format MON-YY e.g. <= 'AUG-12'
    I have tried but get error: A datetime value was expected (received "AUG-12").
    The prompt sql looks like:
    SELECT DISTINCT evaluate('to_char(%1,%2)' as character(30),"JE"."Service Date",'MON-YY') FROM "MAIN RPT"
    Also can the date prompt be ordered asc, can anyone help?

    sliderrules wrote:
    Hi,
    I am trying to create a date prompt
    Field - Service Date
    Data type - Date dd/mm/yyyy
    I would like the date prompt to be <= Service Date in format MON-YY e.g. <= 'AUG-12'
    I have tried but get error: A datetime value was expected (received "AUG-12").
    The prompt sql looks like:
    SELECT DISTINCT evaluate('to_char(%1,%2)' as character(30),"JE"."Service Date",'MON-YY') FROM "MAIN RPT"
    Also can the date prompt be ordered asc, can anyone help?Try this:
    1) For your prompt, select the Service Date column, then click on the Show and change to "SQL Results"
    2) Where the table."Service Date" is, replace with the following:
    MONTHNAME(table."Service Date")||'-'||CAST(YEAR(table."Service Date") as CHAR)
    3) Save this to a presentation variable called pv_Date.
    4) Create a small report with 2 columns: TIMESTAMPADD(SQL_TSI_DAY, -DAYOFMONTH(table."Service Date")+1, table."Service Date") and MONTHNAME(table."Service Date")||'-'||CAST(YEAR(table."Service Date") as CHAR)
    5) Put an "Is Prompted" filter on the 2nd column "equal to" pv_Date.
    This small report will report two things: the month-year of the selection by the user, and the first day of the month of that selection.
    6) In your main report, on your table."Service Date" column, put a filter on this "less than or equal to" and change it to a "filter based on another request."
    7) Point this to the small report and specifically the "timestamp column."
    Now you will have all service dates less than the month-year selected by the user. You didn't mention a bottom limit, but that can be easily added to your criteria. That's it.

  • Date prompt issue with localization

    Hi ,
    I am working on localization of Webi reports. In one report we have a date prompt where user have to provide the input date.
    If we change the locale to Japanese and try to refresh the report with the default date format of prompt  it is throwing error. Is there any way to change the default date format of the prompt when ever we change the locale .
    Any idea please help me , its urgent.
    Thanks,
    Subbu

    Hi,
    Kindly refer SAP Note - 1542533.
    Regards,
    Nakul

  • Date Prompting

    I have a date prompt paramenter field and it prompts for a date in yyyy-mm-dd format. Is there a way to change that prompt to mm-dd-yyyy format?
    Thanks in advance
    Jim

    Hi James,
    In parameter it displays yyyy/mm/dd format only, it is by design.  In report it will print according to our date format.  We can't change this.
    Thanks,
    Sastry

  • Error in date prompt after migrating from 5.x to XI R2

    Hi,
    We have migrated from 5.x to XiR2  SP5 and are facing a problem with the date input parameter.
    Our users use DESKI , when they try to access thier reports  based on Stored Procedure,and the reports  having date prompt , they get an error.
    In 5.x they used to enter the date as DD MON YYYY , in XIR2 they enter it as MM/DD/YYYY but still we get the error
    "The variable is of type date enter its value in the format 9/17/2009 14:50:00 PM"
    The users tried this too but still the same error persists. The Oracle.prm and Oracle.sbo file on teh users machine is the same as that of the server.
    I am able to recreate this error after logging onto the server and opening DESKi there. This error is occuring only with Stored procedures that take date as input parameter
    has anybody faced this issue before, any resolutions for this
    Thanks in advance
    Shreekantha

    Hi,
    After analyzing this problem , what we found that no Stored Procedures that take user input are functioning, irrespective of teh datatype of the input prompt.
    For all SPs that take user input we get an error saying
    Connection or SQL sentence error: (DA0005)
    Exception: DBD, ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'PROCEDURE_TEST_WITHOUTDATE'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    State: N/A

  • Date Prompt result in Report Header

    Hi,
    I am hoping someone can help, I am just getting started with BI but already thinking what I need is not possible. I hope someone can prove otherwise.
    I have a dashboard with several reports that when printed goes across 3-5 pages. There is a date prompt that is used to select the business date for which I want the data to show. What I need to show is the date of the data in the report header for every page that the report runs too.
    I have set the result of the date prompt to set a presentation variable and have set the report header to show @{rptDate}. This works when on the dashboard, although shows TIMESTAMP '2011-09-01' which I would like formatted as 1 September 2011, but more importantly when printed to pdf it shows @{rptDate}
    I have considered setting a report which just returns this date, or putting it in a report header, but that does not meet required formatting consistency, but also I then dont know how to repeat this at the top of multiple pages.
    Thanks in advance for any suggestions.
    Simon

    Thanks Deepak. I am using timecreated in the footer already but that is a different date. I require the ability to run the report for historic dates, and show the date the report contains, rather than the date it was run. ie Report header shows 31/08/11 even if it was generated on 2/9/11.

Maybe you are looking for