Inserting the incorrect Year - 0009 instead of 2009

I have a data entry screen on which I have two date columns. Initiation date is system date and Due date which I select from the calendar java script. Depending on the values of these two fields, I calculate the target date by multiply some percentage with the number of week days between the two dates. The value in these two dates is correct all the time
My problem is sometime the year of date is correct and sometimes the year is incorrect. e.g. 0009 instead of 2009. The code is
var_date := to_date(p_init_date,'dd-mon-yy') + numdays2;
Do you think the next code will make the difference
var_date := to_date(p_init_date,'DD-MON-RRRR') + numdays2;
Why it works most of the times and does not work once in a while? Has anybody have this problem?
Thanks
Yagna

Hi, Yagna,
That's an excellent question.
Do some experiments, like the query below, and find out for yourself:
ALTER SESSION     SET NLS_DATE_FORMAT = 'DD-Mon-YYYY';
WITH  test_data  AS
     SELECT  '01-Jan-09'     AS txt FROM dual  UNION ALL
     SELECT  '03-Feb-009'    AS txt FROM dual  UNION ALL
     SELECT  '04-Feb-0009'   AS txt FROM dual  UNION ALL
--     add more test cases here, if you want.  Copy and modify the line above.
     SELECT     '24-Apr-2009'   AS txt FROM dual
SELECT     txt
,     TO_DATE (txt, 'DD-Mon-YY')     AS yy
,     TO_DATE (txt, 'DD-Mon-RRRR')     AS rrrr
,     TO_DATE (txt, 'DD-Mon-RR')     AS rr
FROM     test_data;TO_DATE tries very hard not to raise an error. For example, if the first argument has a 4-digit year, but the second argument says the year will only have 2-digits, TO_DATE will act as if the 2-nd argument has a 4-digit year, too.

Similar Messages

  • I tried to use my visa gift card to purchase something and I am now aware that it does not have any money in it to purchase anything. Now when I try to update an app it will direct me to the incorrect billing page instead. I cannot update any applications

    Hello. I have tried to use my visa gift card to purchase something from apple. However, the security code is not present, which I am aware of. When I typed in the correct security code, I discovered that there was not enough money in the card to complete the purchase anyway. Now, whenever I attempt to update my applications on my iPhone 3Gs, I am directed to the billing information from the previous purchase that did not work. How do I cancel the purchase and continue to update my applications?

    This happens for some apps. If you have a computer try to buy on it. Otherwise you will have to enter a credit card or some from of billing.

  • 0I_CUFYE pulling incorrect year (ie. instead of pulling current year period

    Hi ,
    Since toady I am facign stragne error..
    till yesterday the same query was showing restriction for 001.2010-012.2010
    today it is showing 001.2011-012-2011
    this variable 0I_CUFYE is dring me craz..
    can anyone help...
    regards,..
    rK

    Hi RK:
      Check if the Note below is applicable to your system.
    SAP Note 645545 - "Retro Fit of CRM-ICM BI Content 3.3 Corrections"
    Regards,
    Francisco Milán.

  • GL_Cancelled_Date displaying incorrect year

    I currently have around 560 rows of bad data where GL_Encumbered_Date and TO_CHAR(PRD.GL_ENCUMBERED_DATE,'YYYY'  display correctly. The problem lies in PRD.GL_CANCELLED_DATE which displays correctly (example: 30-APR-10) but TO_CHAR(PRD.GL_CANCELLED_DATE, 'DD-MON-YYYY') for the same row displays as 30-APR-0010.
    I have separated out the incorrect year with: to_char(prd.gl_cancelled_date,'YYYY') where each of the 560 rows display 0010 instead of 2010.
    I am unsure if arithmetic with dates is allowed within SQL- but am curious if the operation date + number will result in a date. If this is so, how could one go about taking 0010 as a date and add 2000 to create 2010 for: PRD.GL_CANCELLED_DATE.

    i don't understand .. what is the problem :
    SQL> alter session set nls_date_format = 'dd-mon-yy';
    Session altered.
    SQL> select TO_date('30-APR-10', 'DD-MON-YY') from dual;
    TO_DATE('
    30-apr-10
    SQL> alter session set nls_date_format = 'dd-mon-yyyy';
    Session altered.
    SQL> select TO_date('30-APR-10', 'DD-MON-YY') from dual;
    TO_DATE('30
    30-apr-2010
    SQL>

  • How can we import Fixed asset of the current year ?

    Hi ,
    in 1272578 note , SAP Support explain that's it's not possible to create fixed asset of the current year( example = acquisition date = 2009-02-01 )  using import , but they gave no workaround .
    does it mean that we have to manually create all assets of the current year ? or there is another way ( using DI-API for example ) ?
    Thanks

    Good day
    The fixed asset master data import functionality in SAP Business One is used to import assets of the previous year. If you are to force the importation of current year assets some of them might load but system will not be able to calculate planned depreciation for that year, which will give u problems when u try to run depreciation forcing u to post manual depreciation.
    With manual depreciation will not look good on the Fixed Asset Master since it sort of duplicate depreciation ONLY on the Master your report will be fine.
    Capturing Current year assets manually will be the safer road.
    Thanks
    Louis

  • I have exported movies from old digital camera - how do I ensure it goes into the correct year (eg. 2005)  Thank You

    Some exported movies from old digital have gone into the incorrect year.  How can I move them around into the correct year or at the very least move them in the current year but in chronological order eg under 2011 I have listed them as 2004 - blah blah, 2005 blah blah but they are "all over the place".  Thank You

    There are two ways to do this.
    The simplest is to right-click on the clip in the Event and modify the date.
    See iMovie Help here http://help.apple.com/imovie/#mov3ac6c398
    If you have a long clip that you would like to split into smaller clips, there is another way. You can drag the long clip into a free tool called MPEG Streamclip from Squared 5. In MPEG Streamclip, put your playhead on the in point of your first smaller clip and type I. Then set the playhead on the out point of your first smaller clip, and press O to set the out point. Then FILE/EXPORT TO QUICKTIME. If your clip is DV, As you save the clip, rename it in the form clip-yyyy-mm-dd hh;mm;ss.ext, where the word "clip" must be lower case. YYYY is year. hh is hours in 24 hour time.  Then repeat this process until you have all your smaller clips made. Finally, you can import all these clips into an iMovie Event using FILE/IMPORT MOVIES.

  • I ordered the IX500 Scan Snap through Amazon and received the incorrect XI Standard disc in Windows format instead of for my Mac.  I contacted Amazon and they suggested I contact Scan Snap who suggests I contact Adobe for the correct disc.  Please help.

    I ordered the IX500 Scan Snap through Amazon and received the incorrect Adobe Acrobat XI Standard disc in Windows format instead of for my Mac.  I contacted Amazon and they suggested I contact Scan Snap who suggests I contact Adobe for the correct disc.  Please help.

    Fujitsu delivers only Adobe Acrobat for Windows, not Mac.
    http://www.fujitsu.com/global/services/computing/peripheral/scanners/product/ix500/

  • I have WD 1TB and use Time Machine for the past 2 years. Now I have multiple folders in my external hard drive and want to know how to condense all folders into yearly folders instead. Anyone know how to do this?

    Now I have multiple folders in my external hard drive and want to know how to condense all folders into yearly folders instead. Anyone know how to do this?

    anthonycancel wrote:
    I want the folders I already backed up to come together into one folder when that year is over. Is there a way to manually do that or automatic through TM?
    I'm quite sure there is no "automatic" way to do this. I've never heard of anyone trying it either. I suppose if you wanted try it, you could simply create a new folder in the same partition TM is on, label it for that year, then gather all the days for that year and drag/drop them into the folder. I suspect (but do not know) you'd be risking the continuity of your backups, meaning TM would simply start over again, meaning that next back up would start a new series of backups, with the first one roughly equalling the entire capacity of your internal HD, instead of adding only the new data to the previous backup. Once again, I would recommend against it, unless you're fine with TM starting a new series of backups if it doesn't work out the way you want it to. Hope you'll post back with results so we can learn from it.

  • I have a meesage when my sim card in inserted, saying its the incorrect sim card and to activate and unlock my i phone 5 c to contact apple. how do i do this?

    i have a i phone 5 c and when inserting my sim card a message stating its the incorrect card and i need to insert the correct card or contact apple to unlock. the phone is from the USA and im in the UK. how do i contact apple to have the phone unlocked. ?

    Call Applecare in UK and see if they will tell the lock status and who it is locked to in US ,they may charge you
    The chances are that as the iPhone appears locked to a  US carrier,they  will not unlock it for you as you are not or have not ever been a customer
    Did you buy on eBay ? if so file a claim and get your money back
    you likely have a brick
    Apple do not lock iPhones and therefore do not unlock them
    Carriers lock the iPhones they sell as the are part of a package which subsidises the purchase price of the iphone

  • I have macbook mid 2009, with os leopard and I updated it till yosemite now while deleting partition I erased the main hitachi drive , now I have no backups and while switching on it shows folder with question mark,inserting the grey dvd it keep spin

    Have macbook mid 2009, with leopard,  updated to yosemite,  while erasing partition erased hd, dot have backups, powerup shows folder with question mark, inserting grey dvd shows apple and spinning wheel, please help

    Clean Install of Snow Leopard
         1. Boot the computer using the Snow Leopard Installer Disc or the Disc 1 that came
             with your computer.  Insert the disc into the optical drive and restart the computer.
             After the chime press and hold down the  "C" key.  Release the key when you see
             a small spinning gear appear below the dark gray Apple logo.
         2. After the installer loads select your language and click on the Continue
             button. When the menu bar appears select Disk Utility from the Utilities menu.
             After DU loads select the hard drive entry from the left side list (mfgr.'s ID and drive
             size.)  Click on the Partition tab in the DU main window.  Set the number of
             partitions to one (1) from the Partitions drop down menu, click on Options button
             and select GUID, click on OK, then set the format type to MacOS Extended
             (Journaled, if supported), then click on the Apply button.
         3. When the formatting has completed quit DU and return to the installer.  Proceed
             with the OS X installation and follow the directions included with the installer.
         4. When the installation has completed your computer will Restart into the Setup
             Assistant. Be sure you configure your initial admin account with the exact same
             username and password that you used on your old drive. After you finish Setup
             Assistant will complete the installation after which you will be running a fresh
             install of OS X.  You can now begin the update process by opening Software
             Update and installing all recommended updates to bring your installation current.
    Download and install Mac OS X 10.6.8 Update Combo v1.1. From here you can upgrade to Yosemite by re-downloading it from the Purchases page in the App Store.

  • Has anyone else had Library incorrectly group photos in the wrong year?

    Hi All
    I have just noticed, after installing iPhoto 06, that the app has sorted over 4,000 of my pics in to a '2006' folder. I like taking photos but not 4,000 in 34 days! Nearly all these photos were taken in 2005 (there are separate folders in my library for 2005, '04, '03 and earlier).
    I tried moving the pics in to the correct year folder but that did not work. Has anyone else experienced this problem?
    Cheers
    Simon
    iMac G5   Mac OS X (10.4.2)  

    I have a similar (maybe same) problem. I just got a new iMac and imported 9000 images from my external harddrive. Images had been accessed via my WIndox XP computer.
    iPhoto imported images but put several hundred pictures into the wrong "year" folder. 300 pics taken on a 2001 vacation were put into a year 2000 folder (didn't even have a camera in 2000). Some pics taken in 2001 were put into the 2002 folder.
    Can I manually take the pictures from the original/modified 2000 folder and move them into the 2001 folder, ... ?
    Anyone?

  • RH inserts filenames as title elements (instead of the actual chapter titles)

    Hi all,
    I am not sure whether this is a bug or can be fixed. When I import from FM using chapter title paragraph styles for breaking the content into topics, then RH inserts the resulting file names into the topic as <title> elements and not the title names themselves.
    This is no problem as long as you can use the default naming convention (i.e. heading and filename identical). For some output formats hovever it is necessary to use a different naming convention to avoid non-english characters in file names. In such a case I use <n> as naming, resulting in files that have ascending numbers as file names.
    Now I receive e.g. a topic with the h1 heading "This is my topic", the filename "123.htm" and the HTML title "123". That is very bad because in the search results e.g. in Javahelp the HTML titles are displayed, resulting in unusable search results.
    Do you have any suggestions how to avoid this dilemma?
    Robert

    I thought you could control that by using something in a marker – there was some little-known feature that allowed you to control what RH called the filename or or topic title (I forget which) based on a special marker & marker text in FM. You’ll need to dig around for it in either the forum or the TCS blog or the help.

  • Unable to insert break on Year object

    Hi,
         I am trying to insert break on Year object, trying to create a new variable using 'Year' function on 'start_date' but getting error as 'Incorrect Datatype'.
    The Year function is working fine for Today 'Year(<Today>)'--- no error
    Have tried different formats for date(mm/dd/yyyy, standard, number).
    The data provider is excel.
    Regards,
    Aparna

    Hi Aparna,
    I Tried this at My End and Itu2019s working Fine with strange Behavior..
    The  Data I used in Excel is : Format for Start_date I used is Date: *3/14/2001
    In DESKI I used your Format mm/dd/yyyy
    Year     Start_date     Resort     Sales revenue
    2001     5/12/2005     ABC     123456
    2001     6/16/1999     GHJ     45578
    2001     1/15/2000     TYU     45321
    2002     2/15/2006     DEF     789654
    2003     6/12/1996     GHI     456789
    2004     7/19/2009     JKL     128456
    2005     12/12/1998 MNO     123658
    2006     9/24/1984     PQR     784521
    I Came Across Very Strange Behavior.
    Strange Behaviopur 1:
    When I unchecked the Option u201CFirst Row Contains Column Namesu201D Data Provider contains Data as Present in the Excel Sheet ( No timestamp to the Start_date). Here while finding Year from
    Year( Start_date) I got the Error.
    Strange Behavior 2:
    When I Checked the Option u201CFirst Row Contains Column Namesu201D Data Provider contains Start_Date Column in Excel with Time (Adds Time Stamp to the  Start_Date column).
    When I run this Report DESKI automatically inserts variables of Dimension type  Year(Start_Date), Month(Start_date), Quarter(Start_date) I checked this on different  Patches but same behavior. Fix Pack 2.3 ,3.1 ,3.5
    Here when you use year (Start_date) to Extract Year it works Perfect. And You can Put Break on this also.
    So use the Function Year(Start_date) as I mentioened in first  Behavior and delete all other Variables automatically created  using Data-> Variables
    Please check this at your End how it worksu2026.
    I Hope this Helpsu2026.
    Thanksu2026
    Pratik

  • What is currently the best hard drive upgrade for 2009 white mac book? (within reason! ;-) ) looking at Seagate momentus 7200 320gb and momentus XT

    hello people of the Apple community.
    There seems to be a lot of threads regarding some similar issues. Some of the questions seem a few years old so I thought I'd post a new thread. I have a white 2009 macbook and I need to upgrade the hard drive to I think 320gb - cant afford any more. Im looking for a good 320gb fast-ish drive.
    A few questions arise as Im not 100% clued up with the terminology
    1) Is sata 300 of any benefit? how do i check what mine currently uses?
    2) Cache size and spindle speed: is 16mb the standard? and does 7200rpm drain the battery quicker? what do most people go for?
    3) Pleeeese someone recommend something good! The more you look the more numbers and options come available!
    Im looking at the Seagate momentus range .. Is the XT range of any benefit on my machine?
    Thanks, Jeremy

    If I may, it seems uneconomical to spend any amount of $$ to upgrade a "long in the tooth" Macbook. Instead, why not a huge (say 1 TB) external drive for $100.00? And move some of the files from the internal to the external. It will require some "house keeping" to decide what files go where, but this could free up a lot space on the internal, and therefore boost performance as well. And when the long in the tooth finally dies, you will still have the external.

  • Inserting month or year

    In legal documents, I often need to insert the name of the current month or year only (not the entire date), and have it update when I open the document. I can do this in Word, but cannot figure out if this is possible in Pages. Example: " This agreement is executed on the ___ day of November, 2009."
    Just need November and the year to update. These can be separate from each other. I'd be happy if I could just have the month inserted. Any help would be appreciated.

    I'm not sure that AppleScript is the good track.
    I think that using the Merge feature would be a better one.
    Create a Numbers document withg a single sheet and a single table whose row 1 is an header one.
    No column header.
    In cell A1 type month
    In cell B1 type year
    In cell A2 enter the formula : =MONTHNAME(MONTH(TODAY()))
    in cell B2 enter the formula : =YEAR(TODAY())
    In the Pages document insert a merge field pointing to the field month when you want to get the month.
    In the Pages document insert a merge field pointing to the field year when you want to get the year.
    Open the Numbers document to update its contents, save it then apply the merge feature to the Pages document.
    Yvan KOENIG (VALLAURIS, France) jeudi 26 novembre 2009 20:32:21

Maybe you are looking for

  • New iPod Touch 64GB not syncing photos

    Hi, I am really excited to have have just bought my 2nd iPod (ran out of space on my older, 2nd Gen, 16GB iPod). This one is a 3rd Gen 64GB iPod. I have spent a ton of hrs transferring all my music, movies, contacts, fave sites and links, Kindle and

  • CC InDesign PDF Export Presets

    Hi folks. So before I went to CC, if I wanted to export to PDF, I would File>Export and choose PDF then get a dialog box. I made a few presets and they worked just fine. I would choose File>Adobe PDF Presets> choose one and I would still get the dial

  • Ms word 2000 not showing up in software scan?

    Using ZEN 3.2 SP1 Windows 2000 Pro with SP2 workstation with MS Office 2000 installed. Software inventory will report workstations with Word 97 and Word 2002, but NOT Word 2000? Any ideas why? --Kevin

  • Payment method not permitted

    while performing automatic payment transaction, there's a message in the payment run log "payment method "S" not permitted for the vendor". I have double checked these points : the payment methods in the payment transaction accounting tab of the     

  • User Profile Error 1521

    Hello I work as an IT for an aquarium and here lately I have been getting an error about not being able to log in to my roaming profile and it is gonna attempt to log in to my local. Here is the error in Event Viewer Log Name:      Application Source