Validating date problem (simple issue ?)

I am trying to validate a date using the following code:
public boolean validateDate(String testDate) {
try {
SimpleDateFormat sdf = new java.text.SimpleDateFormat("mm/dd/yy");
sdf.setLenient(false);
java.util.Date theDate = sdf.parse(testDate);
return true;
catch(Exception f) {
return false;
No matter what I pass in the date will be formatted as the month January. For example: 5/8/02, 05/08/02 and 05/08/2002 will all format as 1/8/02. This happens to every valid date I pass in. This function is catching the exceptions of an invalid date. I have searched the newsgroups and found many posts and have compared their code with mine and there does not seem to be a problem with the code.
If anyone can give me some insight I would greatly appreciate it.
Thanks in advance for any help.

Thanks bbritta - that was driving me nuts.

Similar Messages

  • Certificate valid dates problems

    I have a smart key with a certificate (key?) and when I view the certificate on my Windows XP PC, the content says it is valid from 3/17/2010 to 3/18/2011, but when I view it in Keychain, the valid dates are 3/29/2009 to 3/30/2010.
    Does Keychain cache old certificates? I am wondering if those dates were on the smart key before I renewed the certificate.
    I am also sure I am probably not using the right terms (certificate, key, smart key, etc.), so if anyone has additional insight, please let me know.
    thanks

    Thanks for the feedback.
    It appears that on the mac since the certificate is expired, I am not able to use it to get to the secured corporate sites that ask for the certificate.
    I have tried to initialize the smartkey and load a new certificate/key that is valid, but it appears that if the mac is reading what is on the smart key, and not on a server, that I did not properly initialize the smart key?
    Is there any approach to emulate what the Windows access is doing and direct the mac authorization to use the server?
    thanks

  • Unable to create BOMMAT IDOCs due to validity date issue

    Hello everyone,   (Posted in SAP-PP forum as well)
    I am having a unique issue with our Bills of Materials. After they are created and set to active, they have validity dates that go from 2001 to 9999. When I go to BD30 to distribute the BOM to the external systems I am getting the following error message:
    No bill of material exists on 08/25/2009 for 2557B27H02/FBLR/1/01
    Message no. BOM014
    Diagnosis
    You want to distribute BOM 2557B27H02/FBLR/1/01 via ALE. However, the BOM is invalid on 08/25/2009.
    System Response
    The system does not distribute the BOM.
    Procedure
    Check the BOM's validity.
    If you want to distribute all BOMs with the change status for another key date, enter another valid-from date on the initial screen.
    If you only want to distribute a certain BOM with the change status for another key date, enter another valid-from date or a change number on the selection screen.
    We get this for any BOM in this system.
    This is our QA environment and do not have this problem in our Development system. BD30 finds the BOM we specified but claims it is invalid on that date.
    We are trying to figure out if there is another status or approval step that I am missing here.
    SAP v4.7 level 19
    Thanks and points awarded for helpful answers!
    John

    Hi John
    Check you Material & Bill of Material in Table:  MAST & STKO whether they are valid or not .. Check valid from date in Bill of material
    Ramesh

  • DMS Document Validity date issue.

    Hello All,
    I have an issue in DMS Valid from Date & Valid to date as below.
    In our Document type when our document status is set to OB i.e. obsolete, in front of the status, system is showing two dates like 22.01.2014 to 31.12.9999.
    We are not using change number functionality in this document type. But still system is showing two dates. When document is in RE i.e Release status system is showing 22.01.2104... date in front of the status.
    Could you please let us know why it is showing two dates in front of document status.
    Thanks

    Hi,
    from my point of view I can inform you that these dates are validity dates for the document. Normally these dates are filled when the document is released to show which version of the document is valid or was valid in a specific period.
    By using menu "Extras" >> "Versions". Here a list of all versions should be displayed and the columns "Valid From" and "Valid to" should show the validity dates.
    Normally these date values are only filled when the status has set the "release" flag in transaction DC10.
    Best regards,
    Christoph

  • Validity date issue: Access Enforcer

    Hi All,
    There is a request in Access Enforcer wherein there are total 4 stages of approval, the first 2 stages have been properly approved however when the same arrived to the 3rd stage of approval, the validity date for the request was over and therefore the approvers tried to extend the same, but the "more" tab is not appearing and therefore the approvers are not able to approve the request by extensing the validity date.
    Can you please help with this issue?
    Thanks
    Vani

    Vani,
      Go to the stage level settings for this particular stage via configuration -> workflow -> stage. Change the option of 'Change request content' to 'Yes' and the approver in this stage should be able to change the vailidity dates.
    Regards,
    Alpesh

  • GATP - Issue with substitution rules with validity dates

    Hi,
    We are using GATP with RBA. Our condition table has plant as a field.
    We are planning to have a substitution procedure (rules) defined at plant level.
    Our rule control for product substitution list is "Start from top of list"
    The issue we are facing is explained below.
    The first item in the substitution procedure (rule) cannot have validity dates.
    So it will always be balnk. And validity dates can be maintained for other items in the procedure (rule).
    What happens in our scenario is when there is a requirement on an item in the substitution procedure (rule) which has  a validity date, the first item in the procedure (which can never have validity dates) is never considerd for substituions.
    If I remove the validity dates, then the first item in the procedure (rule) is considered for substitutions.
    We find this strange and against our business requirement. We want the first item in the procedure (rule) to be considered for substitution ireespective of the validity date for the requested product.
    It would be great if you could suggest a method to achieve this.
    Thanks & regards,
    Arvind.S

    Hi Mohan,
    Thanks for the response.
    We are using back order processing (BOP) for allocation.
    We observed that the first item was not getting considered for substitution in the BOP results and also in product view after the BOP run. No stock of that item was allocated for the order taken up in the BOP run.
    However, we tried rule evaluation also. It shows the first item also, but in actual allocation the issue exists.
    We are not using "start immediately" in check instructions.
    Thanks & regards,
    Ashok

  • What kind of real time problems and issues arise in Data Modelling

    Hellooo experts,
    I am not a BW expertise, so just want to gather some knowledge on Problems and issues related to DATA MODELLING, if any body have a document or a link can you please snd it to [email protected] or reply to this post. I promise to reward you for proper answers hope this is the way i say thanks for your help.
    kishore

    hi kishore,
    The first and most important problem is to understand <b>Clients requirement</b>. Clients even some time not aware of how to utilize efficiency of BW, as they are very much use to with traditional SAP R/3 reporting. So most of time we have to suggest options to client.
    If we come to technical aspect, than identifying <b>Key Figures and Characterstics</b> is the most important task. And how you map that to <b>available infoobjects</b>. Attributes also plays major roles, like which attributes is better to use as navigational one and which as exclusive attribute.
    Their is long list for data modelling issues, its better you refer either <b>Mastering BIW</b> book by Mac'Donalds. And SAP Help Library is also having good material.
    regards,
    kamaljeet

  • Factory calendar issue changing validity date

    Hi,
    We have come across the OSS note 1532398 and 1529649. It's for our Solution Manager system. We are on SP24 EHP1 and i wanted to know how far up can you go in the validity date? I understand the holiday dates need to be changed first but how far up can i go and which calendar would apply for Solution Manager?  My understanding is that becuase we are based in the UK only the UK based calendars would need to be changed or does it depend on which country the user accessing the system is based?
    your help would be very much appreciated.
    Mani

    Hello Mani,
    If you look at SAP Note 501262 - UK Public Holiday Calendar Settings for 2012
    Look at Solution 3
    3. You can now -> Goto -> Public Holiday calendar -> Assign th
    2013 holiday to the calendars GS/GN/GE.
    Change valid from / to definition  -> select 'Spring Bank
    Holiday - 2013' ->  valid from = 2013 -> Save
    Valid from 2013 to 20XX on your demand
    This would suggest that the validity date can be set to any value in the format 20xx.
    Regards,
    Paul

  • ALE BOM. Updates ALL! items with validity date & change no.

    Hi All,
    We are having problems where ALE-BOM sent with change in validity date (with change no) to a particular item. What happens is that ALE-BOM will instead update ALL! items with the same validity date and change number.
    Next,when we process ALE again for the same BOM with a different validity date(with change no), then only that
    particular item is updated with validity date and change no.
    Would anyone know what could be the problem that when changes are sent for the first time all items are updated?
    [Version: SAP 4.6C/ SAPKH46C48]
    Regards,
    Neeth

    Dear:
                   The error itself telling you the correction. You profit center which is assigned to your cost center has a validity date less than the one you are now assigning.You can check in KE52 against the profit center assigned to your cost center master data. However the best thing is to go to KS01 and create this cost center with desired validity date.
    This will resolve your issue.
    Regards

  • Validity Date at BOM componet

    Dear all,
    I'm strugling on changing the valid-to date for a BOM component.
    Let me explain in detail what the scenario is and what I've done so far.
    I have a BOM header "Z" with 5 different components, Y, X, W, V and U. Validity dates should be as follows:
    - Y --> 02.04.2010 to 31.12.9999
    - X --> 02.04.2010 to 31.12.9999
    - W --> 02.04.2010 to 31.12.9999
    - V --> 02.04.2010 to 20.02.2012
    - U --> 21.02.2012 to 31.12.9999
    I have created a change number with validity date 21.02.2012, but when trying to change BOM components validity dates fields will be grey and won't allow me to do the necessary changes.
    Could you please guide me with the necessary steps that I need to follow or where my issue would be? - I have already been checking the forum and followed some of your tips(checked config and so on, and everything seems to be ok).
    Thanks a lot in advance for your help on this one as it's quite urgent to solve this so we can test it, as we need to provide with some explamples on how material variances report will be affected to client ASAP.
    Kind regards,
    Mario

    Hi Mariete ,
    you just need to create a change number with the valid date you want for component , example if you create a change number valid from 01.01.2010 and if you use it for changing BOM , all the changes you made will have this validity date.
    its not possible to input validity dates, so all the times it will be greyed out , you can control it as discribe above.
    in you case you need to create 2 change numbers , 1 with valid from date in 02.04.2010 and use it for component Y X W and V
    and others with validity date 21.02.2012 and use it for component U.
    another thing please keep in mind if you BOM is created in todays date or date which is greater then 02.04.2010 will be a problem , so suggestion is while creating BOM , use a change number which is valid from 02.04.2010 and cause of it all 4 components will be automitacily hace valid date 02.04.2010.
    and after creating this BOM with 4 component  use a second change number and add component U.
    please check i hope it wil help you.
    Thanks
    Ritesh

  • Unable to generate IDOCs in BD30 for BOMs because of Validity Date

    Hello everyone,
       I am having a unique issue with our Bills of Materials. After they are created and set to active, they have validity dates that go from 2001 to 9999. When I go to BD30 to distribute the BOM to the external systems I am getting the following error message:
    No bill of material exists on 08/25/2009 for 2557B27H02/FBLR/1/01
    Message no. BOM014
    Diagnosis
    You want to distribute BOM 2557B27H02/FBLR/1/01 via ALE. However, the BOM is invalid on 08/25/2009.
    System Response
    The system does not distribute the BOM.
    Procedure
    Check the BOM's validity.
    If you want to distribute all BOMs with the change status for another key date, enter another valid-from date on the initial screen.
    If you only want to distribute a certain BOM with the change status for another key date, enter another valid-from date or a change number on the selection screen.
    We get this for any BOM in this system.
    This is our QA environment and do not have this problem in our Development system. BD30 finds the BOM we specified but claims it is invalid on that date.
    We are trying to figure out if there is another status or approval step that I am missing here.
    SAP v4.7 level 19
    Thanks and points awarded for helpful answers!
    John

    Hi
    Enter a lower validity date like 8/25 2004 and try. If not check if there is any change management activated. Also check the ignore distribution lock. Please revert for further discussion
    Krishna

  • Not a valid date - error in Web dynpro hosting the form

    Dear Experts,
    I have an interactive form embedded in an ABAP WebDynpro screen. It has a date field which is filled by the user.
    This field has been working perfectly fine except for one user. Whenever he tries to enter a date and validate (round trip to backend) he gets a 'DD.MM.YYYY is not  a valid date format' error (i.e. '15.02.2011 is not a valid date format').
    Since this is a user specific error, I am unable to debug. When I tried debugging with his login, this error could be intercepted as this is an error thrown by the framework itself because of incompatible types(I think).
    I am using all 3 patterns (validation, edit and display)as DD.MM.YYYY. it is working fine for everyone else, including me!!!!!!
    It is not a system/version issue as we both tried on a  neutral system and it worked for me but not for him.
    Does anybody have an idea as to how this is possible? Any solution for this issue?
    I am baffled, to say the least.
    Regards, Amith
    Edited by: Amith Menezes on Feb 15, 2011 3:47 PM

    Hello there,
    I just found a solution to this problem.
    The crux of this issue was that the 'Binding Pattern' of the date field in the form did not match the Date format of the user's 'Own Data'. For now, I requested the user to change to the frmat maintained in the form and it all worked well..
    But this leads me to a new question.
    How can we make sure that the binding pattern always matches any user's own data!
    Is there a way this can be achieved??
    Regards,
    Amith
    Edited by: Amith Menezes on Feb 16, 2011 1:35 PM

  • Validation "is a valid date" does not pass but Apex proceeding anyway

    Hi,
    I have a simple date-item which I validate first against "not null", then for "is a valid date", then that the date is not in the future.
    In debug mode the first validation passes, the second ( is a valid date ) does not pass, but the validation process proceeds anyway...!? Then the third validation "date not in the future" produces ad DB-Error because it is not a valid date.
    Why does the validation proceed even if the validation does not pass...?
    Version 2.2.0
    Juergen

    Juergen,
    "In debug mode the first validation passes, the second ( is a valid date ) does not pass, but the validation process proceeds anyway...!?"
    Do you mean that the third validation is firing even though the second is failing? This behaviour is correct. All validations fire (regardless of any having already failed) unless they have specific conditions set on them to make them act differently.
    If you don't want the third validation to fire if the second has failed then you will need to put a condition on the 3rd validation to prevent this. Alternatively you could bundle all you validations into one of type "PL/SQL returning Error Text" then have some IF...THEN...ELSE logic in your PL/SQL to return the relevant validatoin text depending on what the problem is (i.e. Date is null, date is invalid or date is in the future).
    Andy

  • Rule Builder Validity Date error

    I've created territories with validity dates, rule policy, ect.  When I start entering rules, no matter which territory I select, I get the following Consistency Check error.
    Validity dates of rule TN Territories should lie with in the selected validity 00/00/0000-00/00/0000.
    The rules are within the validity dates of the territories but those validity dates don't seem to be picking up in the rule builder.  Anyone have any ideas????

    Dear Seguin,
    I have the same problem at one of my customers system. I was glad to see your thread.
    Could you please give me more details how you solved this issue.
    Thank you and best regards
    Stefanie

  • ECN global relase key & valid date

    Dear Guru's,
        I am working in Engineering company as SAP consultant.
    We were followed Discret manufacturing procedure in SAP, now recently we migrated to REM procedure.
    Our R& D dept creating  ECN's , Based on this ECN's creating BOM or updating BOM's.we have only production BOM's usage 1.
    Our general procedure is ECN valid  date will be creating date of  ECN. but using global relase key we released it for production .
    But in REM before releasing the Global release key it will replicate in all BOM's and update in MRP related issues.
    what is relation between Valid date and global release key?
    please provide needful suggestion to resolve this issues.
    Thanks & Regards
    Suresh Babu.S

    Dear Mangalraj,
    Thanks for your kind response,
    I am  giving a live example.Earlier we had only production BOM in Discret Manufacturing Process
    Now we have  changed  to Repitative Manufacturing process in SAP.
    what the ECN's made by R&D are immediately get affected our Production BOM and also our MRP and meterials procurment Procedure.
    Because of this we decided to have Engg BOM and Production BOM to control the ECN and MRP process.
    In our R&D they made some changes and creating ECN numbers, for example  with valid date of  10.08.2007 but they are not released the global release key.
    I would like to know that  ECN creation date 10.08.2007 is valid date for that ECN changes or it will affect after releaseing the global release key while  implementing this ECN number in Production BOM.
    I hope this will help u to understand my problem.If possible give  your personal phone numbers or mailid
    Thanks in advance
    Suresh Babu.S

Maybe you are looking for

  • Error getting while importing support package in R/3

    Hi All, I am getting one error following error while importing support package in R/3. Open data extraction requests The system has found a number of open data extraction requests.These should be processed before starting the object import process, a

  • CS6 Master Suite problem with Photo shop

    I have a new macbook pro ( mid 2012 ) and it has the intel core i5 processor.  I just installed the CS6 Master Suite and everything works fine except for Photoshop.  I get the message : You can't open the application "Adobe Photoshop CS6" because it

  • Can't get e-mail on IPod Touch

    I have always gotten my AOL email on my IPod but today I couldn't.  I get the spinning wheel and it never stops checking for mail.  No mail appears.  I deleted my AOL account than added back but when I put it back just the inbox shows and it is empty

  • Send a mail to partner of shipping point

    Hi, For shipment document (VT01N / VT02N), I need to send a mail to partner assign to shipping point irrespective of output type. That is when the user make an output entry as output type, communication medium (email),function(shipping point) and par

  • Problems with Democracy Player

    I installed the Democracy Player from pacman but I get this error when I try to run it: ImportError: libboost_python.so.1.33.1: cannot open shared object file: No such file or directory Google wasn't very clear about a solution.  Any ideas?