Check the validity of date

hi..i'm creating a new user jsp page and in that i want to check whether the date entered by user as his/her date of birth is valid or not...i've taken three dropdown boxes to enter the date, month & year. how will i check the validity and concate three values and save it in database..thnx

Validate it using java.util.Calendar which is set not to be lenient.
Example: [http://balusc.blogspot.com/2007/09/calendarutil.html].
Save it in DB using PreparedStatement#setDate().
Example: [http://java.sun.com/docs/books/tutorial/jdbc/basics/prepared.html].
The field in DB must be a DATE, DATETIME, or TIMESTAMP.

Similar Messages

  • How to check the validation at data base level as well as current user ente

    Dear all
    i have creation page in that item code will not enter the duplicate values
    in that creation page contains advanced table
    user will click on create 15 blank records using add another row
    suppose in first row user will enter LAPTOP assume this item code
    in this case i need to raise exception through databse level
    in second row also user enter LAPTOP1 in this case exception will not raise becaause data is not there at databse
    in third row user will enter LAPTOP1 in this case item is not there in data base but it is there in second row in this case
    i need to raise exception
    how to achieve this
    Thanks in Advance
    Sreekanth

    You can validate this in form submission.
    1. Call a method in AMImpl.java
    2. loop the ViewObjects and check the values
    3. If you find a match, throw the error
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                   

  • Help reqd on Changing the Valid from "date"  for both BOM & Routing

    Hi all...
    Pls advise me how to do the changing of Valid from "date"....
    Is there any process in CC01 or ECM???....
    pls reply me in detail step format (step by step analysis)....
    I wrongly created in CS01 and CA01 as 05.10.2007 as my valid from date instead of 01.10.2007.....
    How to change to my actual one......
    I dont know how to change it exactly.....as im beginner in SAP...pls take this into consideration...and post ur replies imm.
    Pls reply me in detail....will be rewarded at the end while closing this issue.
    thanks & regards
    sankar

    Dear Sankarbabu,
    IF there's no setting for Date Check in OS54 - Engineering Change Management
    Control Data,then you can create a change number with past dates,and also to
    use the same one for changing BOM.
    Tell me one thing you are saying you want to use ECM.Was the earlier one
    created without BOM was created without an ECN?
    See already if you have created your BOM with an ECN,then remove the date
    check setting which I have mentioned in OS54.
    Now goto T code CC02 ,enter the Change number and give the valid from date as
    01.10.2007.
    After that check in CS03 whether this date(01.10.2007)is getting reflected or not.
    I'm sure this will solve your problem.
    Regards
    Mangal

  • Ehancement for to check the validations in ME21n,ME22n,ME28,ME29n

    Hi experts...
    I have one requirement in Ehancement for to check the validations in ME21n,ME22n,ME28,ME29n...
    If the PO document date is after 31.12.2010 and vendor Group 1800 then check the Inco-terms with "SET" values whether the user entered value fals with in the "SET" value, if so then allow to save the PO else Else system should read the "SET" values and suggest user to select correct Inco terms.
    Example when user enter wrong Inco-Terms then system shoud give Error Message Please Select Inco-terms CPT or DAP or FCA..
    Can any body plz suggest me the user exit or Is it possible through the enhancement Framework...
    plz help me how to proceedd??
    Thanks & Regards,
    Veena.
    Moderator Message: Spec-dumping is not allowed.
    Edited by: kishan P on Jan 3, 2011 11:00 AM

    Hi Veena,
    To find a BADI for a given tcode follow the below steps.
    1. Go to the TCode.
    2. Menu Item System -> Status.
    3. Double click on the transaction Name (For ME21N double click on ME21N).
    4. Check the Package (e.g. ME)
    5. Go to TCode SE80
    6. In the drop down choose Package and type the Package Name (e.g. ME). Dont forget to Hit Enter or display.
    7. Object Name Enhancements -> Business Add-ins (Def.) (You will see all the BADI's available here ).
    In your case, you need BADI : ME_BAPI_PO_CUST.
    Go to SE19 to implement the BADI.
    If you put your conditions in Create Purchase Order(ME21N), you will not need to add them in Release PO(ME28N) since the conditions will be checked when PO is created.
    Regards,
    Jovito.

  • Is there anyway we can check the validity of dump file in Unix system

    Hi,
    I have taken export of 2 tables which are huge in volume. one of the table seems to be successfully exported yet another one failed due to space scarcity. Since both the tables share a single dumpfile.
    I wanted to know.
    1. Can we use the same dumpfile to import the table which is successfull or it can not be used because the second table got error while exporting?
    2. Is there any way we can check the validity of dumpfile in unix plateform.
    Your reply is highly appreciated.

    784786 wrote:
    Hi,
    I have taken export of 2 tables which are huge in volume. one of the table seems to be successfully exported yet another one failed due to space scarcity. Since both the tables share a single dumpfile.
    I wanted to know.
    1. Can we use the same dumpfile to import the table which is successfull or it can not be used because the second table got error while exporting?No. It is better to take another backup of the same
    >
    2. Is there any way we can check the validity of dumpfile in unix plateform.
    Please check the export log backup. If it says that export terminated successfully, then the dump may be fine.

  • To check the License Expiry Date on EP??

    Hello All,
                   I have completed installing Permanent Licenses through VA in SAP EP.How to check the license expiry date in a stand alone server like EP??Moreover can u pls tell me what authentication is required for applying licenses through slicense??I did some with sap* & the others with ddic??

    How to check the license expiry date in a stand alone server like EP??
    You can see the license and all the details of it in the licensing adaptor using Visual Admin.
    Moreover can u pls tell me what authentication is required for applying licenses through slicense??I did some with sap* & the others with ddic??
    Any user with SAP_ALL will do.... doesn't matter if you install some with SAP* and some with DDIC
    Regards
    Juan

  • How to check the last receiveing date of a specific material

    Dear Experts,
    I want to check the last receiving date of an specific material.  Is there any standard t.code ?
    Mov.Type 101, 103.
    Thanks in advance.
    Dinesh

    Hi,
    Transaction code MB51 used to list out the posting date of GR received material document number, date and quantity.
    This report is basically used for list out all the material document based on sort out of posting date, movement type (101 ,103 etc).
    There you can easily find it the posting date of the GR receiving.
    MC.A is the Analysis report which is used for analysis of Material total Goods receiving and goods issues -basic list.
    - I suggest to use report MB51 - based on receiving movement 101, transfer 301,311 etc or issues movement 201 posting date.
    Thanks and Regards,
    Thiru

  • How to set the Valid-to-date (datub) of a BOM item

    Is there a way I can set the "Valid-to-date" of a BOM item?
    According to SAP documentation...
    Quote
    <i>"If you change a BOM using a change number, the system determines the valid-to date dynamically."</i>
    Unquote
    I want to "expire" a BOM item. Meaning I want to set the valid-to-date to a date in the past.
    Is this possible at all?
    Thanks for any input.
    Fred

    Ferry,
    Thanks for you reply.
    I do not see a field for the "Valid-to" date in the function module - CS_BOM_EXPL_MAT_V2. There is one for the "Valid-From" date called DATUV. But I would like to change the "Valid-from" date of the BOM item.
    Or is there another way to set the BOM item's valid-to date using this function module which I am missing?
    Fred

  • How to check the validation of RegEx

    Hi,
    My application needs users to enter RegEx. My question is how I can check the validation of the RegEx that users enter. The Class RegExp does not seem to provide any methods to check the validation of the RegEx.
    Regards,
    Haibin

    You would need to hand roll your own validator, unless someone knows of one that is out there. Flex does not validate RegEx.
    If this post answers your question or helps, please mark it as such.

  • I have checked the box "display date and time on the Menu Bar" and it does not work.  Using OS X Yosemite 10.10.2  Anybody have a fix?

    I have checked the box "display date and time on the Menu Bar" and it does not work.  Using OS X Yosemite 10.10.2  Anybody have a fix?

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your documents or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this behavior; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Please take this step regardless of the results of Step 1.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled in OS X 10.9 or earlier, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of Steps 1 and 2.

  • Check the validity of a SQL statement before execution

    Hi everyone,
    In an applet I have created, I am allowing the user to create a SQL statement which will be sent to a servlet that in turn issues the JDBC request for the SQL statement. My concern is that since my GUI lets the user create more or less any kind of SQL statement (including an illegal one) I need to verify if the user has created the correct SQL. How can this be achieved?
    To recapitulate and summarize, I need to know how I can check the validity of a SQL statement without actually executing it and handling the SQLException. FYI, I am using the mm-mysql driver.
    Thanks,
    Alan

    jschell is correct. Unless you're writing something like an ISQL tool you want to be very careful doing this.
    Having said that Mimer SQL have SQL validators that may do what you want http://developer.mimer.com/validator/index.htm
    They've also got the SQL Validator running as a web service that you can use. Theres example code here showing how to use it.
    http://sqlvalidator.mimer.com/index.html
    At the risk of being accused of selfpromotion you can check out the SQL Validator plugin for SQuirreL SQL CLient. This is a fully functional example of using the Mimer SQL Validation web service. http://squirrel-sql.sourceforge.net/
    Col

  • TS1702 when i am trying to download new game from app store it showing "to check the time and date settings"?

    when i am trying to download new game from app store it showing "to check the time and date settings"?

    planb77  The OP said he has iOS 3. The Automatic in Settings>General>Time and Date was introduced in iOS 5. The OP just has to see if the time and date, included time zone, are correct.

  • How to check the validity period of saprouter ?

    Dear all,
    As per sap note 1178684, we can check the validity period of the saprouter by executing "sapgenpse get_my_name -n validity"
    I am wondering how to run that command in as/400 ?
    Please advise. I am not familiar with as/400 OS.
    Thanks
    Regards,
    Kent

    Hi Kent,
    please proceed as described on the http://www.easymarketplace.de/snc-iseries-setup.php
    logon with sidadm (or sidofr):
    (depending on the user, that is running the SAPRouter)
    CD DIR('/usr/sap/saprouter')
    ADDLIBLE LIB(SAPROUTER)    ??? or whereever the stuff is ...
    RMVENVVAR ENVVAR('SECUDIR')
    ADDENVVAR ENVVAR('SECUDIR') VALUE('/usr/sap/saprouter')
    RMVENVVAR ENVVAR('SNC_LIB')
    ADDENVVAR ENVVAR('SNC_LIB') VALUE('/usr/sap/saprouter/sapcrypto')
    CALL PGM(SAPGENPSE) PARM('get_my_name')
    Regards
    Volker Gueldenpfennig, consolut international ag
    http://www.consolut.net - http://www.4soi.de - http://www.easymarketplace.de

  • How to change the valid from date of the bom header?

    ECM is active in the system.
    I want to change the valid from date of the BOM header with the help of a change number.
    How can I change it?

    Hello
    Lets assume that, we are going to change Management for controlling Valid From date
    Steps to be followed for creation of Change No
    Tcode CC01 for Change No
    Click on Change Master
    Once you enter into Change master, maintain the description
    In the Valid from Date, maintain the date from which you BOM should be current
    Maintain the Status (01)
    Click on Ojbect Type, maintain for which Object types is the Change no needs to be active i.e. for BOM, Rtg, etc
    save the Change No
    After the change no is created
    Enter the Change No during the creation mode of BOM
    THe system copies the Valid from date from Change No

  • How to check the validation in UI before committing data?

    Hi,
    I'm using Jdev 11.1.2.1.0 version .
    I needed to check whether there is duplication of values in Boolean check box before committing the data into the Database.
    But this validation rule is to be checked based on the value selected in the Select One Choice drop down list in the page.
    I did it with adding a ValueChangeEvent in the drop down list and checking the values in the Boolean check box. It worked , but only in the case of earlier committed data in the database.
    How can i actually verify the data entered in the table in the page before it being committed into the DB ?
    Nigel.

    Hi,
    an improvement to your solution would be to move the major part of your code from the backing bean into a method on the ApplicationModuleImpl file (you create this from the AM editor)
      public boolean checkForDuplicate(){
           ViewObject vo = this.findViewObject("ResponseVO");
           int numRows;
           int j=0;
           numRows = vo.getRowCount();
           String rowValue = "a";
    //the part below of your code I don't like at all. Why do you need to increase a flag
    //and use an if statement ?
           for (int i=0; i<numRows; i++){
              rowValue = (String)vo.getCurrentRow().getAttribute("ResponseFlag");
              if(rowValue.equals("Y")){                           
                  j++;
                  if(j>1)
                      return true;
             return false;                           
        }This code you then expose on the AM as a client interface (same AM editor --> Java menu option)
    In the PageDef file (double click it to access the visual editor) click the plus icon next to the Bindings header. Choose "Generic Binding" --> method binding and point it to the AM and the exposed method. This creates a method binding "checkForDuplicate"
    Change your managed bean code to
      BindingContext bctx = BindingContext.getCurrent();
      BindingContainer bindings = bctx.getCurrentBindingsEntry();
      OperationBinding checkForDuplicate = (OperationBinding ) bindings.get("checkForDuplicate");
      checkForDuplicate.execute();
      boolean isDuplicate =  checkForDuplicate.getResult();            
      if(isDuplicate){
             FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, null, "Two same respones!");
             FacesContext.getCurrentInstance().addMessage(null, msg);
                                               Frank

Maybe you are looking for

  • Sent items are sometimes not saved

    Hi, I have an intermittent problem in Mail 2.0.5, where some e-mails are not being saved in the sent items folder I have set up. I'm using IMAP, and have selected the option to store messages on the server, and have selected a folder to use for sent

  • No text in iDVD

    I created a project in iMovie '11 (720p) and then share to media browser.  After completion I opened up iDVD, went to OneStep DVD From Movie under File. After burning the DVD everything was fine except for the opening page.  The title (text) was miss

  • Trouble loading the schems in MQL

    Has anybody had problems loading the schema in MQL for the Autovue integration into enovia? I got below error while adding formats. Looks like Markup policy is set to "6". Pls check your script. attempting lookup ... Viewable Schema Object Lookup fai

  • Installed Internet Explorer 11 and now flashplayer wont work or be recognized by IE 11

    I      I received a Microsoft update foir my pc with the new Internet Explorer 11 on the update. I downloaded it and installed it and now when I try  to annotate my financial charts on Stockcharts.com I cant, I get a message that this requires flashp

  • Supported operating systems for v2v conversions in vmm 2012 R2

    Hi All, We implemented SCVMM 2012 R2 on one of our customer location, Now we requires to perform V2V migration from VMWARE to SCVMM, before that We have to figure it out the "Supported operating systems for V2V conversions in vmm 2012 R2"  Is there a