Date Format type issue

Ok I have a data base that for some reason dates are stored
in a varchar field. the dates in the field look like this 20060809
which is supposed to be 09/08/2006. Well I want to display the
dates like that (mm/dd/yyy). But when I jus the date format of
mm/dd/yyy I get something like 08/16/56824. So How can I display
20060809 to read 09/08/2006?
I appreciate any help! Thanks!

20060609 is not a standard date style that CF date functions
can
understand. You will need to parse this into it's components
and either
use them directly or create a date object with them for
future use. Our
dates are often in this format so we have to do this all the
time.
<cfscript>
DateVal = 20060809;
yearVal = left(dateVal,4);
monthVal = mid(dateVal,5,2);
dayVal = right(dateVal,2);
writeOutput(dayVal & "/" & monthVal & "/" &
yearVal);
dateObj = createDateTime(yearVal, monthVal, dayVal);
writeOutput(dateFormat(dateObj, "dd/mm/yyyy");
<cfscript>

Similar Messages

  • Date format conversion issue in BW

    Hi Experts,
    I have 2 custom date fields for which I'm getting the values from oracle database through DB Connect in MM/DD/YYYY format (e.g values 10/20/2007 and 3/5/2007). But I want to convert this date format into SAP BW internal format (YYYYMMDD). I've defined the above 2 date fields in BW with a data type DATS (8 digits length) and wrote a code in the TRs as below. Both these fields are defined as a character with a length of 10 in the oracle system.
    data zresult(10) type C.
    data :  lv_day(2) type c,
    lv_month(2) type c,
    lv_year(4) type c.
    zresult =  tran_structure-spring_norm_date.
    lv_day = zresult+3(2).
    lv_month = zresult+0(2).
    lv_year = zresult+6(4).
    CONCATENATE lv_year lv_month lv_day into result.
    But still the data load is getting failed due to wrong date format and error in the routine. It says the value for the characteristic 0DATE doesn't have 8 spaces. Is there anything wrong with the routine?
    Could someone please share some inputs on this.
    Thanks,
    Krish

    Hi Narasimha,
    Thanks a lot for your prompt response and inputs. I used this code as below in my TR for the date field. But its still giving an error message saying "Value '20072109' of characteristic 0DATE is not possible and error when assigning SID". The value what I can see in the source system (oracle table) and in PSA for this record is '9/21/2007'. Am I still missing something here?
    DATA: get_date TYPE sy-datum,
    s1(2) TYPE c,
    s2(2) TYPE c,
    s3(4) TYPE c,
    lv_length TYPE i,
    lv_length1 TYPE i.
    SPLIT TRAN_STRUCTURE-FALL_NORM_DATE AT '/' INTO s1 s2 s3.
    lv_length = STRLEN( s1 ).
    IF lv_length = 1.
    CONCATENATE '0' s1 INTO s1.
    ENDIF.
    lv_length1 = STRLEN( s2 ).
    IF lv_length1 = 1.
    CONCATENATE '0' s2 INTO s2.
    ENDIF.
    CONCATENATE s3 s2 s1 INTO get_date.
    RESULT = get_date.
    Could you please help me on this?
    FYI, I have defined my date field in ODS with the data type DATS in order to display the output in YYYYMMDD format.
    Thanks,
    Krish

  • Format type Issue

    Hi,
    Our functional team has generated a customised report but it is getting truncated as when they are executing in background. The spool generated by the report doesn't show all the columns. The defined format type to the printer was X_65_255.
    We tried creating new format types of higher colums i.e. Z :X_65_512 and Z :X_65_1024 but still the generated report is getting truncated.
    The SAP version on which we are working is BBPCRM4.0.
    Please let me know if you need any other information.
    Thanks in advance
    Sushant Goel
    << Personal information removed >>
    Edited by: Rob Burbank on Nov 13, 2009 1:46 PM

    Hi All,
    The problem is resolved, please refer to the SAP Note 186603 for resolution.
    Regards
    Sushant

  • Help: Date Format Mask Issue year 0004 instead of 2004

    Hi,
    I set Date Format Mask as MM/DD/YYYY for a date field. However, when user enter
    12/31/04 the result turned out as 12/31/0004
    Of course, I'd like user put 12/31/2004, but 12/31/04 leads to 12/31/0004 has to be stopped.
    Any suggestions?
    Thank you in advance.
    Jimmy

    Thank you very much Francois and it works for me.
    Jimmy

  • Pivot table data format type

    Hi.
    I was trying to make a simple crosstable report with this structure:
    ----------Name
    ID-------Description
    Example:
    ---------Name1------------Name2-------------Name3
    ID1---Description1
    ID2----------------Description2
    ID3--------------------------------- Description3
    But i can't, because it only appears numeric functions for pivot table data
    How can i configure pivot table? Why is defined the pivot table data as a numeric field with functions summation, count, ......? Can't i show plain text of the description?
    Edited by: user3284194 on 18-abr-2013 4:48

    Hi,
    Try increasing the rangeSize of the iterator to some value like 150?
    -Arun

  • "Too Few Arguments" error when using Date Format

    I'm attempting to format some date information. I'm taking the following query:
    mysql_select_db($database_adventcms, $adventcms);
    $query_rsDatedetails = sprintf("SELECT * FROM tbEvents WHERE id = %s", GetSQLValueString($colname_rsDatedetails, "int"));
    $rsDatedetails = mysql_query($query_rsDatedetails, $adventcms) or die(mysql_error());
    $row_rsDatedetails = mysql_fetch_assoc($rsDatedetails);
    $totalRows_rsDatedetails = mysql_num_rows($rsDatedetails);
    and changing it to this:
    mysql_select_db($database_adventcms, $adventcms);
    $query_rsDatedetails = sprintf("SELECT *, DATE_FORMAT(datestart, '%b') AS whichMonth, DATE_FORMAT(datestart, '%Y') AS whichYear, DATE_FORMAT(datestart, '%D') AS whichDate FROM tbEvents WHERE id = %s", GetSQLValueString($colname_rsDatedetails, "int"));
    $rsDatedetails = mysql_query($query_rsDatedetails, $adventcms) or die(mysql_error());
    $row_rsDatedetails = mysql_fetch_assoc($rsDatedetails);
    $totalRows_rsDatedetails = mysql_num_rows($rsDatedetails);
    When I run it I get this error:
    Warning: sprintf() [function.sprintf]: Too few arguments in /home/iasindia/public_html/beta/newsandevents/eventdetails.php on line 60
    Query was empty
    which refers to the query line above. The odd thing is that same query works on a different query like this:
    $query_rsDates = "SELECT *, DATE_FORMAT(datestart, '%b') AS whichMonth, DATE_FORMAT(datestart, '%Y') AS whichYear, DATE_FORMAT(datestart, '%D') AS whichDate FROM tbEvents WHERE status = 'Live' AND datestart >= CURDATE() ORDER BY datestart DESC";
    $query_limit_rsDates = sprintf("%s LIMIT %d, %d", $query_rsDates, $startRow_rsDates, $maxRows_rsDates);
    $rsDates = mysql_query($query_limit_rsDates, $adventcms) or die(mysql_error());
    $row_rsDates = mysql_fetch_assoc($rsDates);
    But I can't get it to work on the $query_rsDatedetails above.
    Any help would be appreciated!

    The sprintf function is interpreting the date format type as an input. There are several solutions:
    http://stackoverflow.com/questions/5835534/mysql-query-date-format-and-sprintf

  • Issue with Date format - ABAP to XML

    Dear Users,
    We are currently facing an issue with the date formats in XML.
    We have a system (.Net), which has a webservice that we are calling for information from SAP. We created a Proxy class in SAP from the WSDL file and have attempted to use the method that gets us required information based on the Timestamp passed from SAP. However, the timestamp that the INPUT structure uses has a data element XSDDATETIME_Z.
    All we can send from SAP is a simple TIMESTAMP, but the .Net system doesn't accept it since it wants the timestamp in XML format i.e. <dd-mm-yyyy>T<hh:mm:ss>Z. SAP documentation says that the field should automatically do conversion from ABAP to XML format, but that doesn't happen. We don't want to build a string from Timestamp in the XML format and send it out since we might surely miss out on the different cases involved.
    Can anyone please suggest a way for us to send the date out in the required XML format?
    Many thanks!

    Hi Vijay,
    Look at the below sample code and it works fine, i guess there is something wrong in your code or conversion, post the actual code if you are still not able figure it out with the below example.
    DATA: l_xml_string TYPE string,
          l_dat_time TYPE xsddatetime_z.
    CALL FUNCTION 'CACS_DATE_GET_TIMESTAMP'
    EXPORTING
       I_DATE                         = sy-datum
       I_TIME                         = sy-uzeit
    IMPORTING
       E_TIMESTAMP                    = l_dat_time
    EXCEPTIONS
       DATE_NOT_FILLED_BUT_TIME       = 1
       DATE_HAS_NO_VALID_FORMAT       = 2
       OTHERS                         = 3.
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL TRANSFORMATION id
      SOURCE root = l_dat_time
      RESULT XML l_xml_string.
    IF sy-subrc EQ 0.
    write: l_xml_string.
    ENDIF.
    Regards,
    Chen

  • Date Format Issue with Interactive Form

    Hi, here is the scenario:
    -We just upgraded to SP17 from SP15
    -I'm using Livecycle Designer 8.0
    When we were on SP15, this was not an issue.  I was wondering if anyone encountered this problem and if so, if there is a workaround?
    I create an interactive form to start a guided procedure process.  Im passing the data from my desktop Interactive form to another callable object in GP to send an email with the PDF attached.  This all works correclty. 
    My date/time fields are set to type DATE with a display pattern of YYYY-MM-DD.  When I create the form in the GP administrator to my desktop and open the PDF, the date format is correct. However, when I submit the form to start the process, the incomming date fields to be mapped to my second Callable Object have change in format from "2009-02-18" to  "Wed Feb 18 00:00:00 EST 2009".
    This is true in the new form I receive via email, and also in NWA->monitoring->guided procedures when I check the instances.  The input mapping is already set to the false formatting.
    When I open the form from the second callable object with the incorrect date format (in designer), the date's display patterns are set to YYYY-MM-DD but are not being displayed as such.
    New discovery....I tried to create a Business Logic callable object and format the date.  I created a string input and date output and mapped them accordingly.  When I perform a "TEST" from the design time and use the input "Wed Feb 18 00:00:00 EST 2009", the string is automatically converted to 18/02/2009 in the output, which is what I want to occur.  The only problem is when I run the actual process, the same "Wed Feb 18 00:00:00 EST 2009" is being output instead of the 18/02/2009 in the TEST.
    Anyone have any ideas?
    Thanks.
    Edited by: Warren Clements on Feb 26, 2009 2:20 AM

    This test program might help...
    import java.util.*;
    import java.text.*;
    public class ExpandYear
        public static void main(String[] args) throws ParseException
         SimpleDateFormat sdf_2dyear = new SimpleDateFormat("MM/dd/yy");
         SimpleDateFormat sdf_4dyear = new SimpleDateFormat("MM/dd/yyyy");
         String test1 = "3/21/00";
         System.out.println("test1: " + test1 + " to : " +
                      sdf_4dyear.format(sdf_2dyear.parse(test1)));
         String test2 = "4/9/99";
         System.out.println("test2: " + test2 + " to : " +
                      sdf_4dyear.format(sdf_2dyear.parse(test2)));

  • Prompt window Issues-resize and date format setting to 'mm/dd/yyyy' .

    Guys,
            I have two issues which needs to be solved for better reporting.
            I am using url reporting approach to view reports in ActiveX viewer.
            1) I have to set date format to 'mm/dd/yyyy' in parameter prompt window by default It is in yyyy-mm-dd format.
             2) I have to make prompt window with full size screen in order to accommodate more than one date parameter and make it looks better.
         Can any one tell me how to change and fix date format and resize Prompt window?
          Should I open a ticket with business object in order to solve or customize the Crystal Report Server XI R2 configurations for us?
        Please suggest me some probable options for it.
    Sincerely,
    Sanjay Patel
    Edited by: Adlyd Joseph on Feb 3, 2009 7:22 AM

    Hello Adlyd,
    SAP Business Objects does not support customizing Infoview, CR Server, or BusinessObjects Enterprise.  I'll post the content of SAP Business Objects Note 1218598 below that speaks to this.  Even if they could help customize CR Server/Enterprise/Infoview there's no way to change the parameter prompting page.  It's a page that is generated at runtime, and it isn't exposed to any of the BusinessObjects SDK.
    If you want to see if SAP Business Objects can help you with the date format that might be possible.  In North America you can call 1-800-877-2340, and select option 4, and then option 1.
    You can also purchase technical support from the [Online Store|http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300].
    Sincerely,
    Dan Kelleher
    NOTE: This Note was written for BOE XI and XI R2, but it applies to BOE XI 3.0 and 3.1 as well as all versions of CR Server since version XI (v11.0).
    ++++++++++++++++++
    1218598 - Support policy on customizing BusinessObjects InfoView and other applications
    Symptom
    In previous versions of Business Objects products, Business Objects Customer Support had assisted customers with the customization of the ePortfolio and InfoView applications by providing guidance on what changes were required for simple and specific custom features.
    What is the support policy for customizing BusinessObjects XI, XI Release 2, XI 3.0, XI 3.1 InfoView and the other included applications?
    Resolution
    Starting with BusinessObjects XI, code-level customization of InfoView and the other applications included with BusinessObjects XI is not supported and not recommended. These applications include Crystal Reports Explorer and the Central Management Console.
    InfoView is a fully-featured product and can be customized by changing settings in the Central Management Console or by changing values in the application configuration files only.
    Requests for custom features in InfoView or any other included applications will be treated either as enhancement requests, or in extreme cases, as product defects. Any feature that does not function as documented will be treated as a product defect.
    Custom features may also be implemented as part of an Original Equipment Manufacturer (OEM) agreement, or by engaging Business Objects Consulting Services.
    Background Information
    Modification of any of the following file types in BusinessObjects InfoView XI, XI Release 2, XI 3.0, XI 3.1 is not supported:
    .aspx
    .cs
    .vb
    .ascx
    .asax
    .jsp
    .java
    .js
    .htm
    .html
    .csp
    See Also
    For more information, please refer to the technical paper, [Customizing Look and Feel using the CMC and Style Sheets|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/209e174d-be3e-2b10-4d8e-e25a76a6fac1].

  • Issue in Date Format in Production

    Hi ,
    I have written for Invoice Prining SAP SCript for F.62.
    In developemt and Quality system Date format is coming" MM/DD/YYYY" But in Production system it is showing "YYYY/DD/MM'.
    I have checked the Program aslo, which is also same in every server and checked the User Profile also, which is showing 'MM'DD'YYYY'.
    I am trying to get the solution, what may be the reason for the same.
    Rgds
    Mohit

    HI Mohit,
    if possible provide your sap script printing code. so that we will analyse the issue.
    For time beeing try  to use below code during Invoice Prining
    DATA: year(4),
          mnth(2),
          day(2),
          l_v_date  TYPE sy-datum.
    CLEAR: date,
           year,mnth,day.
    CLEAR: year,
           mnth,
           day,
           l_v_date.
        year = g_wa_head1-lfdat+0(4).
        mnth = g_wa_head1-lfdat+4(2).
        day  = g_wa_head1-lfdat+6(2).
    CONCATENATE mnth '/' day '/' year INTO date.
    regards
    sudheer

  • Data Pump issue with nls date format

    Hi Friends,
    I have a database with nls date format 'DD/MM/YYYY HH24:MI:SS' from where I wish to take export from. I have a target database with nls date format 'YYYY/MM/DD HH24:MI:SS' . I have a few tables whose create statements have some date fields with DEFAULT '01-Jan-1950' and these CREATE TABLE statements when processed by Data pump is getting failed in my target database. These tables are not getting created due to this error
    Failing sql is:
    CREATE TABLE "MCS_OWNER"."SECTOR_BLOCK_PEAK" ("AIRPORT_DEPART" VARCHAR2(4) NOT NULL ENABLE, "AIRPORT_ARRIVE" VARCHAR2(4) NOT NULL ENABLE, "CARRIER_CODE" VARCHAR2(3) NOT NULL ENABLE, "AC_TYPE_IATA" VARCHAR2(3) NOT NULL ENABLE, "PEAK_START" VARCHAR2(25) NOT NULL ENABLE, "PEAK_END" VARCHAR2(25), "BLOCK_TIME" VARCHAR2(25), "FLIGHT_TIME" VARCHAR2(25), "SEASON" VARC
    ORA-39083: Object type TABLE failed to create with error:
    ORA-01858: a non-numeric character was found where a numeric was expected
    The table create sql which adds a column as ' VALID_FROM DATE DEFAULT '01-jan-1970' ' which I think is the issue. Appreciate if someone can suggest a way to get around with this. I have tried altering the nls of source db to be same as target database. Still the impdp fails.
    Database is 10.2.0.1.0 on Linux X86 64 bit.
    Thanks,
    SSN
    Edited by: SSNair on Oct 27, 2010 8:25 AM

    Appreciate if someone can suggest a way to get around with this.change the DDL that CREATE TABLE to include TO_DATE() function.
    With Oracle characters between single quote marks are STRINGS!
    'This is a string, 2009-12-31, not a date'
    When a DATE datatype is desired, then use TO_DATE() function.

  • Date formating issue

    Hi All,
    I am receiving the Begin Date and End date from one of the RFCs and then using these dates for the import parameters of another RFC.
    But the second RFC receives the dates either in YYYYMMDD or DD.MM.YYYY format.
    The BeginDate and EndDate of the first RFC are binded to two input fileds so they appear as Date pickers in the runtime.
    As I select the date range , I need to execute the second RFC before submition and so the Import of the Second RFC should receive the date range .
    I have gone through many Forum threads but the way they are suggesting, returns me no right result. If I follow the Simple date Format, I parse the date and have a String output which the second RFC does not accept.
    And if I assign the parsed value to the a Date type then I receive a null value for the same. I need your help , please suggest and guide.
    Regards
    DK

    Hi Mohanthy,
    As you told, BeginDate and EndDate of the first RFC are binded to two input fileds and the values of BeginDate and EndDate has to be sent as input fields to another RFC.
    Just get the values from the node generated by first rfc and set them to the i/p node of second rfc.
    Date Format should not be  a issue in this case and for your information the date which is used by RFC is Java.SQL.DATE Class.
    Regards,
    Kiran Kumar

  • Date Formatting Issue

    Hi ,
    I Have Procedure where it take input parameter date value
    for eg
    PROCEDURE P_GET_EMP_DATE(V_DATE IN DATE)
    IS
    V_BEGIN_DATE DATE;
    BEGIN
    SELECT max(BEGIN_DATE) into V_BEGIN_DATE FROM
    emp where TRUNC(APPT_DATE) =V_DATE+90;
    END;
    now my doubt is APPT_DATE is storing the date format in 12/16/2002
    but V_DATE which iam passing to the procedure is in the format
    '14-jul-2008' . When i execute the procedure its compiling and executing
    successfully.
    but when i try to test the single sql manually i get the following error
    ORA-00932: inconsistent datatypes: expected DATE got NUMBER .
    i know to fix the issue we have to do like this
    TO_DATE(TRUNC (APPT_DATE),'YYYY/MM/DD') < = TO_DATE('2007/03/31','YYYY/MM/DD') + 90;
    my doubt is how pl/sql engine interpreting the dates and returning the results
    though there are errors in the query.does it automatically doing formatting
    and type conversions ?

    You seem to be a bit confused about how to work with Oracle dates...
    Basically, we humans represent dates as strings in particular formats: 14th July 2008, 14/07/2008, 07-14-2008, etc.
    Oracle stores dates in its own particular format.
    In order for us to communicate with Oracle's dates, we either manipulate something that's already stored in the database as a date (eg. sysdate or a date column) OR we use the to_date and to_char functions, which convert a string to an oracle date format and vice versa.
    When working with dates in Oracle, you should stick to using the date format. If you're working with things already stored in dates, then great - you've got nothing to worry about conversion wise (and more specifically, never to_date something that's already in the date format!). You only have to worry if you have to specify a particular date as a string - then the to_date function comes into play.
    If you're wanting to output a date, you can either rely on your nls_date_format parameter setting (ok for ad-hoc queries, bad for coded queries!!) or you can explicitly state the format you want it to appear in using to_char.
    Hopefully that's clarified things for you

  • How can we give the Data Format (File Type ) in Runtime

    Hi all,
    How can we give the Data Format (File Type ) in Runtime for the following method,
    cl_gui_frontend_services=>gui_download.
    Thanks in advance
    Sri

    There is a filetype parameter which you can set
    CALL METHOD cl_gui_frontend_services=>gui_download
      EXPORTING
    *    BIN_FILESIZE              =
        filename                  =
    *    FILETYPE                  = 'ASC'
    *    APPEND                    = SPACE
    *    WRITE_FIELD_SEPARATOR     = SPACE
    *    HEADER                    = '00'
    *    TRUNC_TRAILING_BLANKS     = SPACE
    *    WRITE_LF                  = 'X'
    *    COL_SELECT                = SPACE
    *    COL_SELECT_MASK           = SPACE
    *    DAT_MODE                  = SPACE
    *    CONFIRM_OVERWRITE         = SPACE
    *    NO_AUTH_CHECK             = SPACE
    *    CODEPAGE                  = SPACE
    *    IGNORE_CERR               = ABAP_TRUE
    *    REPLACEMENT               = '#'
    *    WRITE_BOM                 = SPACE
    *    TRUNC_TRAILING_BLANKS_EOL = 'X'
    *  IMPORTING
    *    FILELENGTH                =
      changing
        data_tab                  =
    *  EXCEPTIONS
    *    FILE_WRITE_ERROR          = 1
    *    NO_BATCH                  = 2
    *    GUI_REFUSE_FILETRANSFER   = 3
    *    INVALID_TYPE              = 4
    *    NO_AUTHORITY              = 5
    *    UNKNOWN_ERROR             = 6
    *    HEADER_NOT_ALLOWED        = 7
    *    SEPARATOR_NOT_ALLOWED     = 8
    *    FILESIZE_NOT_ALLOWED      = 9
    *    HEADER_TOO_LONG           = 10
    *    DP_ERROR_CREATE           = 11
    *    DP_ERROR_SEND             = 12
    *    DP_ERROR_WRITE            = 13
    *    UNKNOWN_DP_ERROR          = 14
    *    ACCESS_DENIED             = 15
    *    DP_OUT_OF_MEMORY          = 16
    *    DISK_FULL                 = 17
    *    DP_TIMEOUT                = 18
    *    FILE_NOT_FOUND            = 19
    *    DATAPROVIDER_EXCEPTION    = 20
    *    CONTROL_FLUSH_ERROR       = 21
    *    NOT_SUPPORTED_BY_GUI      = 22
    *    ERROR_NO_GUI              = 23
    *    others                    = 24

  • Date format issue in oracle database

    Hi,
    Back end : Oracle 11.2.0.2.0
    Front end : Forms 11g
    In our application we are facing issue with TO_DATE('DD/MM/YYY') Date format conversion.
    Example: TO_DATE(P_date,'DD/MM/YYYY') giving the result as 20-Dec-0009
    In the above eg the Parameter P_date is coming as '20-dec-09' from the front end (forms 11g)
    The Nls_date_format parameter at database level is set as 'DD-MON-RR'
    Its working fine after changing the conversion as TO_DATE(P_date,'DD/MM/RRRR') .- If we do like this , we need to change in many places , so instead of doing this, is there other solution wrt database settings/Application settings where we can change and fix this issue
    pls help us to solve the issue.
    Regards.
    sathish k

    892913 wrote:
    Hi,
    Back end : Oracle 11.2.0.2.0
    Front end : Forms 11g
    In our application we are facing issue with TO_DATE('DD/MM/YYY') Date format conversion.
    Example: TO_DATE(P_date,'DD/MM/YYYY') giving the result as 20-Dec-0009
    In the above eg the Parameter P_date is coming as '20-dec-09' from the front end (forms 11g)
    The Nls_date_format parameter at database level is set as 'DD-MON-RR'
    Its working fine after changing the conversion as TO_DATE(P_date,'DD/MM/RRRR') .- If we do like this , we need to change in many places , so instead of doing this, is there other solution wrt database settings/Application settings where we can change and fix this issue
    pls help us to solve the issue.
    Regards.
    sathish kWell the solution is right in front of you. As you say, your database environment is set to DD-MON-RR so your database is set to use 2 digit years (something most people moved away from with the millenium bug more than 10 years ago now). You can either change all your code to use RRRR as you've found, or change your database NLS setting to DD-MON-RRRR and change your front end application to pass you a date with 4 digit years so you get e.g. '20-dec-2009'.
    So many people worked hard to resolve the millenium bug issues all those years ago, but still we have people, all these years later, who want to reintroduce the problem. So sad.

Maybe you are looking for