Date format requirement

Hi,
9i environment.
I am trying to format a date to return from a query in this format: YYYYMMDDHHmmSS.ssss+/-ZZZZ
Right now I formated my query to look like this:
TO_CHAR( a.FINALIZED_DATE , 'yyyyMMddHHmiss' ) || '-0500' AS finalized_date
I need the ability to add the '-0500' on the fly depending on standard vs daylight savings.
My first attempt to resolve I attempted to use something like
select SESSIONTIMEZONE from dual;
with the formatting it looked like:
select substr(SESSIONTIMEZONE,0,3)||substr(SESSIONTIMEZONE,5,2) from dual;
This query return +0000 . It should return -0500 (and -0400 when not in daylight) for my time zone.
Further research pointed me to doing this:
ALTER SESSION SET TIME_ZONE = '-5:00';
What does this actually do in terms of referencing date/times in the fields? Will this have an adverse effect on my data since I been collecting data in its current form for so long?
Is there more elegant solution?
Thank you.
Scott Ross

bump. any suggestions?

Similar Messages

  • Date format Required as - DD - MM - YYYY instead of MM - DD - YYYY

    Dear SDN,
    I am getting Due date for Net Payment (Technical neme: 0NETDUEDATE)as for today (2/29/2008) for the report Top 10 Credit memos (0FIAR_O03)...
    But the client requires it has to appear as 29/2/2008...
    I mean we need the date format as DD - MM - YYYY ...
    Please Resolve this issue..
    Help will be greatly appreciated with points..
    Thanks in advance

    Hi Venkat,
                   You can achieve inone way is
    go to TX -  SU01
    There select 'Default' Tabstrip chane date format to
    DD - MM - YYYY
    you can get in that format.
    else try to find some F.M.  for conversion...........
    Regards,
    Viajy.

  • Formscentral - how do I change required date format to long date (e.g. January 2, 2014) in a form field?

    Formscentral - how do I change required date format to long date (e.g. January 2, 2014) in a form field?  I can't seem to change it from the short date format.

    Hi,
    I would suggest you to change the form language to English (UK), Here are the steps:-
    1. Open your form in FormsCentral
    2. Clik on Options tab
    3. Click on Language and Formatting and check out the selection for Form Language and make sure English (U.K.) is selected and the default date format should be day/month/year.
    Regards,
    Nakul

  • Date format in CSV file not coming as required

    Hi,
    I have a problem in date format after it is downloaded as a CSV file. In CSV file it is coming as 2/6/2009
    but the format i required is 2009/02/06. Im using GUI_UPLOAD FM for file download. In the internal table im having the date in this format YYYY/MM/DD only.
    How can i bring the date in CSV file in required format?
    Thanks in advance,
    Srilakshmi.

    Hi Srilashmi,
    You question really made me wear thinking cap.
    When you populate date in SAP system, it's taken in internal format i.e YYYYMMDD, though you declare date field as DATE, D or SY-DATUM, the issue comes into light, when you got to display it.
    1. Import date in internal format i.e. YYYYMMDD,
    DATA:
      w_date type d.
    2. Declare another variable w_date1(10) like C.
    3. Goto System-> User Profile -> Own Data -> Defaults -> Date Format. Now, whatever date you have set, it's gonna take the same format.
    4. WRITE W_DATE TO W_DATE1, transport imported date to char type w_date1, this makes date appear in format you want it to .
    And regarding, saving in CSV format, not always GUI_UPLOAD or GUI_DOWNLOAD works,
    TEXT _ CONVERT _ XLS_TO_SAP   -> From program to excel sheet
    ALSM_EXCEL_TO_INTERNAL_TABLE  -> Excel sheet to Program
    Hope this helps you.
    Thanks: Zahack

  • Changes required in date format

    Hi All,
    I have downloaded data from one database table into excel sheet.The date format of the downloaded data in the excel is yyyy.mm.dd but I want the date format as yyyymmdd (8 char in length).Can any one help me in this regard?
    Waiting eagerly for your response.
    Thanks and regards
    Raj

    Hi Rajarshi,
    After downloading the dat from database table into Excel.
    Right click on any cell of excel-->selct FORMAT CELL...>NUMBER(tab)---> Select Date category and Right side select
    required date format.
    Regards,
    Pravin

  • Required help with date format

    Hi All,
    I am calling a webservice from plsql, for this I am using UTL_DBWS package. I want to insert the format of date as 'YYYY-MM-DD' only. I used to_char(sysdate, 'YYYY-MM-DD') , but it is throwing error. Please suggest any solution.
    Thanks and Regards,
    Mahesh
    The error details are as follows
    ORA-29532: Java call terminated by uncaught Java exception: javax.xml.rpc.soap.SOAPFaultException
    Caught exception while handling request: invalid date: 25-NOV-08
    ORA-06512: at "SYS.UTL_DBWS", line 403
    ORA-06512: at "SYS.UTL_DBWS", line 400

    user6391695 wrote:
    Hi All,
    I am calling a webservice from plsql, for this I am using UTL_DBWS package. I want to insert the format of date as 'YYYY-MM-DD' only. I used to_char(sysdate, 'YYYY-MM-DD') , but it is throwing error. Please suggest any solution.What happens is...
    You convert sysdate into a string of the format YYYY-MM-DD and then you are passing that to a parameter that is a DATE datatype. When you do this oracle has to implicitly conver the string to the DATE datatype. It does this based on the NLS settings of the session which, I would guess, are not of the format YYYY-MM-DD, so it can't understand the string you have passed and fails to convert it to a date.
    Date formats are not something that is stored on the database (assuming you are correctly storing dates as DATE datatype). The format of dates is a display issue and something that should be handled by the user interface. The database stores data, just that, no display formats. ;)

  • Date format not working in XML Publisher

    Hi,
    We have applied a date format while formatting the report layout using the Template.
    The same is not getting reflected.
    The output is as follows : 5/1/2006 0:0:0
    i.e date with time stamp.
    We require DD-Mon-RRRR format.
    The same has been tried using the Text Form Field Options.
    When applying the same for Number it works . But in case of Date it does not.
    Can anybody who has worked on the same, let us know the appropriate way to do the same.
    Thanks,
    Angelica.

    XMLP does not recognized the field as date. The only format recognized as date is
    YYYY-MM-DDThh:mm:ss+HH:MM
    So, either make the data model to return dates in the above format, and then apply date formatting in XMLP, or do the job on the data model side and return the string in the desired final format (which, again, then will be string, not date for the XMLP)

  • Date format of footer in pdf

    How to change the date format of footer from dd/mm/yyyy to Monday 09 August 2010 when we down load the report in pdf file

    Hi,
    Revenue is a sample column. You can pull any measure column used in the report.
    And put this formula in a separate new column. And in the narrative view use this column number.For Ex- if the number of the column in the criteria is 15, then mention @15 in the narrative view.
    NOTE-Rows to display in narrative view should be set to 1.
    And in the formula-CEILING(CAST(COUNT("F1 Revenue"."1-01 Revenue (Sum All)") as DOUBLE)/ 25)
    25 refers to the number of row count to display. You can define the number according to your requirement.
    Regards,
    MuRam

  • How to handle Multiple date formats for the same date field in SQL*Loader

    Dear All,
    I got a requirement where I need to get data from a text file and insert the same into oracle table.
    I am using SQL*Loader to populate the data from the text file into my table.
    The file has one field where I am expecting date date data in multiple formats, like dd/mon/yyyy, yyyy/dd/mon, yyyy/mon/dd, ,mm/dd/yyyy, mon/dd/yyyy.
    While using SQL*Loader, I can see Loading is failing for records where we have formats like yyyy/dd/mon, yyyy/mon/dd, mon/dd/yyyy.
    Is there any way in SQL*Loader where we can mention all these date formats so that this date data should go smoothly into the underlying date column in the table.
    Appreciate your response on this.
    Thanks,
    Madhu K.

    The point being made was, are you sure that you can uniquely identify a date format from the value you receieve? Are you sure that the data stored is only of a particular limited set of formats?
    e.g. if you had a value of '07/08/03' how do you know what format that is?
    It could be...
    7th August 2003 (thus assuming it's DD/MM/RR format)
    or
    8th July 2003 (thus assuming it's MM/DD/RR format)
    or
    3rd August 2007 (thus assuming it's RR/MM/DD format)
    or
    8th March 2007 (thus assuming it's RR/DD/MM format)
    or even more obscurely...
    3rd July 2008 (MM/RR/DD)
    or
    7th March 2008 (DD/RR/MM)
    Do you have any information to tell you what formats are valid that would allow you to be specific and know what date format is meant?
    This is a classic example of why dates should be stored on the database using DATE datatype and not VARCHAR2. It can lead to corruption of data, especially if the date can be entered in any format a user wishes.

  • How to change the date format from default to mm-dd-yyyy?

    Hi,
    There is a requirement to show the current date in an error message at the attribute level. That is, if the user input a date in a text field that is earlier than today's date, then an error message must immediately pop up with today's date in the message. To achieve this we are using a token expression in the EO ( Under Validation rules) . The token expression uses adf.currentDate to get today's date.
    The problem is that the expression extracts the date in the form of yyyy-mm-dd. What expression should I use to get the current date format in mm/dd/yyyy ? Can I modify the adf.currentDate expression in some way to get the desired format?
    Thanks,
    Anand

    You could write a custom EO method to return today's date in the specific format. Then access it via the Groovy adf.object expression.

  • Date format in msd crm

    Hi,
    I have a CRM reports rdl format where SQL query has been used. Now I have to replicate these n online CRM where SQL is not supported. I am trying to conver to fetch xml. One report is easy. other 2 reports uses calculations for date and time.
    Requirement 1: Need to display filter(parameter in SSRS) in report page where user can select Month +Year(Eg: Aug 2011, September 2013)  where createdon month+ year is equal to the above mentioned parameter value. These are fetched from dim
    time table and concatenated to form a filter. Filter shoul display from current year+ all months to 2010 +all months  But created on date is in date time and I do not know how to format this to get year and month and how to give months and years
    as parameters calculating from current date.
    Requirement 2: Similar knid of report where monh is a separate drop down(Jan to Dec) and year is separate(current year(2014) to 2010). so result will b createdon dates month and year is equal to the selected value.
    Please let me know how to achive this using fetch xml, multivalue parametes etc
    Thanks and Regards
    Indu

    As I said one approach to fill date is to use event (trx crmv_event) in which you can define when certain function module is triggered.
    Next you have to create Z function modul (trx se37). Create new fm as copy of one standard fm which is triggered on similar standard event as it will be your new event.
    Then it comes the coding part in new fm. There you can use standard fm 'CRM_APPT_MAINTAIN_MULTI_OW' to fill the desired date type according to your needs. For example to set it to current date (date when event is triggered) + 21 days.
    Regards.

  • Date Format  error while loading *.dat  file to Sataging .

    Hi All ,
    Loading data from *.dat file in to Staging , the dat file contains data for date in 'MM-DD-YYYY' format which is String , when it loading by control file it produce the error date format is not supported .I think ti required DD-MM-YYYY format . Is their any properties to change the date format or else need to write the function for converting date format .
    I am using OWb 10g Release 1 , with same DB .
    Please guide me
    Thanx in advance
    Regards ,

    Hi,
    Before loading into staging, you can use Expression operator to convert the CHAR into DATE with something like this:
    TO_DATE('01-02-2005','MM-DD-YYYY')
    Hope this helps.

  • DATE Format Error in ODI-11g(11.1.1.3)

    I am using ETL transformations in ODI-11g. There's a dominant issue regarding date formattings when I map an ODI variable (storing date) with a TGT column(datatype=date) mappings.
    In all the src-tgt mappings I am formatting the date by using TO_DATE() functions. But still getting the error:
    "ORA-01830: date format picture ends before converting entire input string".
    A point to Note: The same ETL in other env are ruuning fine but in my new dev env it's giving this date error.
    I had checked with the DBA folks and they confirmed they set equal DATE settings in all the env.
    The ODI Variable is defined as an "Alphanumeric".
    Tx Used: #BUSINESS_CURRENT_DT=TO_DATE('Date','YYYY-MM-DD')
    Require some urgent advice...Please let me know

    Hi,
    W store name-value pair in the Control table from where we exctract our data. Both (param name and param value) are varchars.
    Well this looks pretty strange in 11g! Here's what we found out...
    If you are trying to retrieve a date variable by using TO_DATE() in the refresh query the ODI Java driver (JDK 1.6) would call java.sql.timestamp and gracefully attach HH:MI:SS.NS along with the date (YYYY-MM-DD HH:MI:SS.NS). My target ia a date always..!
    So, when I do: TO_DATE('20101010','YYYY-MM-DD) in the refresh query ODI stores it as '2010-10-10 00:00:00.0'
    For this the Load always fails as Oracle would not be able to interpret a timestamp by suing TO_DATE()
    The Java driver does this damage. However, it may be wise to store as a timestamp rather as a date if in case u do a Data capture and want the exact time credentials.
    Unfortunately not a req, as of now for us so I had to chop-off the timestamp..!
    Let me know if you find any other details...
    Thanks.!

  • Date format in Bex Output should be changed while using with Text Variable

    I am using a Bex Query where have defined a Text Variable with replacement path. So whatever Date user enters in the selection screen variable (Input Variable) the same date appears in the report description.
    For Ex: If user enters 30.04.2012 in Char Variable/Input Variable before executing the report, so once he executes the report the same date appears on report description like "ABC Analysis as on 20120430". Is also changes the report description whenever user changes the date in selection screen variable.
    My requirement is......Date format should be come as 30.04.2012 (DD.MM.YYYY) instead of 20120430 (YYYYMMDD) in report description.
    Guys could you please help me out to achieve the desired output.
    Rgds,
    Ritu

    Please check if you have selected Replace with Key in that text variable.
    Instead of that select External characteristic value key.
    This should help you in giving the desired output.
    Regards,
    AL

  • Date format in IDT

    Hi,
    I have an universe based on Teradata. I created a filter in IDT and it's like this :
    @Select(Sales\Calendar Day) =  @Prompt('Date:','D',,Mono,)
    When I use this filter and execute a test query in IDT, the date format is shown different in these 2:
    Enter a value : 10.Feb.2015
    Date : 10.Feb .2015 00:00:00
    I formatted the Calendar Day dimension and I can see it as 'mm/dd/yyyy' in the report result. That's fine.
    However, I want to do the same for the prompt screen in IDT too. How can I do this?
    The requirement is, I use the same filter for SAP Lumira and it does not provide a calendar component for date selection.
    So, the format of date to pass to universe is not clear.
    Thank you!

    Hi
    Try to change the format Cal day using below options, and then check the filter date format is showing as per your requirement
    predefined function TO_CHAR
    Use the custom display format option.
    Please find the below link for more info
    BI4.1 Business Layer Enhancements - Create Display Format

Maybe you are looking for

  • Prevent abuse of a signed applet?

    Hi I am creating an application using HTML, javascript, and a set of java classes. Communication betwwen the javascript and java is done by an applet, signed with a real certificate. I would like to prevent someone copying my signed jar, and abusing

  • How to give connection between sap R/3 to sap BI 7.0 system

    how to give connection between sap R/3 to sap BI 7.0 system

  • [JS CS3] BridgeTalk : bt.body = x.toSource() vs a bt.body = a String

    Hi, I found a script on this page http://d.hatena.ne.jp/kamiseto/ The author uses this line : bt.body = toInDesign.toSource()+"("+contents.toSource()+","+gb.toSource()+","+kumi.toSource()+");"; I tried to use this syntax and my script didn't produce

  • Slow script warning when prompt choice list has more than 100 elements

    Hi, Has anyone experienced this issue in Internet Explorer version 7 and above? If the prompt has more than 100 elements (my current use-case), the prompt does not get rendered and I get the slow/busy script warning in Internet Explorer. I have not e

  • Jena adapter and glassfish

    I have been trying to get the Jena adapter , joseki and glassfish to work with 11g. No success so far. Glassfish just throws an error because somewhere in the code there is a cast to (OracleConnection) that is incorrect. My glassfish connection pool