Validate Date problem

Hi,
I need to validate the date format.
if the user enter the date in wrong format then it has to show the prompt message will u please solve this problem

Hi
You can use SimpleDateFormat.
http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
public SimpleDateFormat(String pattern,
DateFormatSymbols formatSymbols)
And for the prompt message, you can just make use of the thrown exceptions.

Similar Messages

  • Validate Data in Web Form

    we want to validate data in web form in planning through Java Script Code ?
    how we can do it and what is the location of that Java Script file ?
    One more thing ... if we make any changes in Java Script code then is it necessary to stop and start planning server or application ?
    Thanks in Advance ..... :-)

    Hi,
    you can resolve this problem, adding a JavaScript code in validateData.js.
    For example you can change and/or insert the code in validateForm function, that save the data only if the function return true.
    There are also another function and the code example in SampleValidateData.js that you can see.
    You find the ValidateData.js in the folder "custom" of your installation.
    For example:
    /default web application directory/deployments/your web server/HyperionPlanning/webapps/HyperionPlanning/custom
    I report an example for control the data before saving it:
    function validateForm(){
    if (equalsIgnoreCase(applicationName,"BDG"))
    if (equalsIgnoreCase(formName,"1.10A ECO"))
    var rowPrecVers = currentDataGrid.endRow;
    var colPrecVers = 2;
    var rowActVers = 3;
    var colActVers = 3;
    var valTotPrecVers = 0;
    var valTotActVers = 0;
    valTotPrecVers = currentDataGrid.fullPrecision[rowPrecVers][colPrecVers];
    for(rowActVers; rowActVers < currentDataGrid.endRow; rowActVers++){
    valTotActVers = valTotActVers + parseFloat(currentDataGrid.fullPrecision[rowActVers][colActVers]);
    if(valTotPrecVers < valTotActVers){
    alert("Ops!!!Don't match" + "\n"
    + "Previous Version: " + valTotPrecVers + "\n"
    + "Actual Version: " + valTotActVers);
    valid = false;
    return valid;
    else{
    return valid;
    Insert and modify this code in validateForm function.
    If in your installation use Tomcat web server, you must save the change on the ValidateData.js file each time. If you use the WebLogic web server tou must restart the service. For other web server I don't know.
    Take it easy and have fun!!!
    Flavio

  • Help needed with missing data problem in CRVS2010

    We recently upgraded the reporting engine in our product to use Crystal Reports for Visual Studio 2010 (previously engine was CR9). Our quote report, which has numerous subreports and lots of conditional formatting, started losing data when a quote took more than a single page to be printed. We knew the SQL results included the data, but the report was not printing those lines at all or sometimes printing a partial line. In addition, the running total on the report would exclude the lines that were being missed on the next page. In one example submitted by a customer, 3 lines were skipped between pages.
    I think I have identified two potential issues that document the possibility of data not being included in the report.
    The first potential issue is an issue with the "suppress blank section" option being checked. This issue is supposedly fixed with ADAPT01483793, being released someday with service pack 2 for CRVS2010.
    The second potential issue is using shared variables. This issue is supposedly fixed with ADAPT01484308, also targeted for SP2.
    Our quote report does not explicitly use shared variables with any of the subreports, but it does have several subreports, each in its own section that has the "supress blank section" option checked. We have other reports that use this feature, as well, and they are not exhibiting the problem.
    One different thing about the quote report is that it has a section with multiple suppression options selected. The section has a conditional suppression formula, which controls whether the section is included at all within the report. The section also has the suppress blank section option selected. There are multiple fields within the report that are each conditionally suppressed. In theory, the section's suppress formula could evaluate to true, yet all of the fields within the section are suppressed (due to null values), and then the "suppress blank section" option would kick in.
    The missing data only seems to happen when the section is not being suppressed, and at least one of the fields is being included in the report. If I clear the "suppress blank section" check box, and change the section formula to also include the rules applied to the fields in the section, the missing data problem seems to be resolved.
    Is this related to ADAPT01483793? Will it be fixed in service pack 2?
    If more details are needed, I would be happy to provide a sample report with stored data.

    Hi Don,
    Have a look at the Record Selection formula in CR Designer ( stand alone ) and when exported to RPT format opening that report in the Designer also. 
    There's been a few issues with => logic in the record selection formula. It could be you are running into this problem. Look for NOT inserted into your selection formula.
    Oh and SP2 is coming out shortly so it may resolve the issue. But if you want you could purchase a support, or if you have a support contract then create a case in SMP and get a rep to work with you to debug the issue.
    If you have not try the Trial Version of CR 2011, put it on a VM-ware image or Test PC so you don't corrupt anything for production and have a look at and test it in that designer also. If you purchase a case and it is a bug then you'll get a credit back for the case.
    Don
    Edited by: Don Williams on Oct 26, 2011 7:40 AM

  • Clearing of Balance in GR/IR clearing account due to date problem

    >Hi to All,
    >The scenario is like this :-
    >The client is making back dated entries for quarter between 01.04.2008 to 30.06.2008 in SAP in July 2008 as the system is getting implemented now. He wants to regularise all the transactions in SAP from 01/04/2008.
    >The users entering the data were new and hence though the miro and payment entries were made by F&A in back date. The Purchase Orders and the GRs were prepared in the current date of July 2008.
    >Because of this date problem the GR/IR clearing account is having balance in it, which should have been clear after the processing of the miro document.
    >The documents were handed over to f&a after preparation of GR in the systems for Invoice processing through MIRO.
    >Can anyone plz give a solution to clear the balance GR/IR clearing account.
    >Thanks in advance.
    >Ashutosh M Joglekar.

    Hi Muthuraman,
    No need to clear any thing for PO pending items.
    Regards
    Gitesh

  • My macbook pro recently got swiped and I lost all my data, problem is, just before it was swiped I set up my new iphone 5 which transferred all my photos and music over which is no longer on the computer. What will happen to my phone if I plug it in?

    My macbook pro recently got swiped and I lost all my data, problem is, just before it was swiped I set up my new iphone 5 which transferred all my photos and music over which is no longer on the computer. What will happen to my phone if I plug it in?

    I never used icloud before so there is no data to back up from. I just spoke  to the apple store and they said that if I do plug it in, all the data will be swiped....is there a program I can use to transfer my data from my phone to computer without loosing it all ???
    Renee

  • Getting error while tring to Check in any document in Sharepoint 2007. Error - "Unable to validate data. System.Web.Configuration.MachineKey.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) ...

    Hi Team,
    I am getting error while tring to Check in any document in Sharepoint 2007. Error - "Unable to validate data. System.Web.Configuration.MachineKey.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength).
    Anybody please let me know how to resolve the issue. It has affected our 9 site collection with almost 2000+ sites. Please email me your your suggestion or you can share your ideas here also.
    Tried to reset the IIS, checked the Internet connection speed (8MBps). Cleared the cache and all but no luck.
    Thanks,
    Pronob

    Hello,
    I have found this support window for you:
    http://support.microsoft.com/kb/556031
    http://technet.microsoft.com/en-in/library/cc298582%28v=office.12%29.aspx
    This may help you
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Will apple next update to help fix the location following data problems will the ipod touch 2g be included ?

    will apple next update to help fix the location following data problems will the ipod touch 2g be included ?

    Chances are the 2g itouch will not be included in the update. Also no one yet knows if it will be fixed in the next firmware but apple has said they know of this bug.

  • How to validate Date

    Hi,
    We have a date field in the form. I am validating date format as YYYY-MM-DD, validation works fine. But If user enters invalid date, how to validate date? For examples:
    2006-02-31 It is an invalid date. How can i validate it.
    If anybody have sample code, it will help me a lot.
    thanks
    Neopal.

    Hi Neopal,
    You can use something like the following to test the date is valid, use the validation event on the <Field> which you want to validate to call a Rule something like this (not complete)..
      <Rule name='isDateValid'>
            <RuleArgument name='date'/>
            <block>
           <script>
              var dateToTest = env.get('date');
              var formatter = new java.text.SimpleDateFormat('YYYY-MM-DD');
              Date validDate = formatter.parse(dateToTest);

  • Function Module to validate date

    Hi,
    Is there a Function module to validate date in transfer rules or update rules. I checked the forum, couldn't find an answer. Any help is appreciated
    Thanks
    Bala

    You should be able to use this FM:
    CALL FUNCTION 'RSAR_DATE_CHECK_PLAUSIBILITY'
      EXPORTING
        i_date                          = yourdate
    EXCEPTIONS
       PLAUSIBILITY_CHECK_FAILED       = 1

  • Validate Date Range in inputDate component

    Hi
    I am using JDev 11.1.1.2.0
    I have an inputDate component which on click i need to give dates from today to future dates not passed dates.
    So i have included 'validate date time range' component in the inputDate component and in the minimum property i have declared 'adf.currentDate' using expression builder and set the maximum as Jan 31,2099.
    But when i execute my application i am able to select passed dates using the inputDate component, please help how can i check the date using a validator in inputDate component.
    Thanks
    Sudeep

    ya i had tried with that property too....
    i have declared minValue as adf.currentDate and on that it changes the value of maxValue to current date in Jan 3,2012
    i have convertDatetime component in my inputDate to display the selected date in certain format.
    It gives error as the format doesnot matches with the convertDatetime and inputDate component.
    How can i use the minValue and maxValue of inputDate component?
    the component:-
    <af:inputDate
    label="Planned Termination Date"
    id="id2"
    value="#{modifyuser.pterminationdate}"
    valueChangeListener="#{modifyuserfields.plannedTermDate}"
    minValue="adf.currentDate" maxValue="2099-12-31">
    <af:convertDateTime pattern="dd-MMM-yyyy"/>
    </af:inputDate>

  • Validate date ?

    Dear All,
    May I enquire how to validate date for:
    textDateofLoss.getText()
    Is it:
    if isDate(textDateofLoss.getText()){
    //True date
    else{
    //False date}
    Please advise.

    Sorry, have to use the following:
    import java.util.*;
    import java.text.*;
    public class validateDate {
    public static void main(String args[]) {
    String dt = "10-10-1990";
    String format = "dd-mm-yyyy";
    // String dt = "1990-10/10" throws a ParseException
    // String dt = "1990-10-35" throws a IllegalArgumentException
    try {
    //DateFormat df =
    //DateFormat.getDateInstance(DateFormat.SHORT);
    SimpleDateFormat df = new SimpleDateFormat(format);
    df.setLenient(false); // this is important!
    Date dt2 = df.parse(dt);
    System.out.println("Date is ok = " + dt2);
    catch (ParseException e) {
    System.out.println(e.getMessage());
    catch (IllegalArgumentException e) {
    System.out.println("Invalid date");
    }

  • Validate date using RE

    Hey guys,
    Need to validate date using RE in format MM/DD/YYYY and optional HH:MM:SS
    I already have simple solution, but would like to add checks for leap year and dates like 02/30/2006 or 04/31/2006
    So far I have this:
    private static final String datePattern =
         "^(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\\d\\d" +
         "(\\s(([0-1]?[0-9]|2[0-3]):([0-5]?[0-9]):([0-5]?[0-9]))){0,1}$";

    A much better way is to specify the format of the data and parse it using the SimpleDateFormat class method parse.

  • Validate date of Birth

    How I can validate date of birth?
    Month-Date-Year
    Example: 11-21-1960
    Thanks

    You could use a regular expression:
    E.g.
    var dateRegExp = "^(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])-(19|20)\d\d$"; // mm-dd-yyyy
    if (oField.rawValue.search(dateRegExp) === -1) {
         // error!
    Or you could use a date object as suggested in the previous post, but also stop the user from typing in a date so they will be forced to use the date selection box. This would ensure that the date is always in the correct format. To stop the user from typing in data, put the following code in the change event for the field:
    if (xfa.event.change.length == 1) {
    xfa.event.change = "";

  • Validate Date and block JavaScript page change

    how I can validate date acrobat, can block JavaScript page change, only change with a button? 

    If you use the "util.scand" method date validation is part of the process. It either returns the number of milliseconds from the Epoch date used by JavaScript for the date time object the null value.
    Date Arithmetic has some sample scripts, but you need to keep in mind that Date and Time are not independent and using "new Date()" returns the date and time at the time that line of code is executed and that can cause issues for the computing of dates only.
    Are you sure of day count, most differences include the start and end dates in the number of days for the calculation.
    Custom calculation for today's date field (format is None):
    // get today's date an time
    var oToday = new Date();
    // set to start of day
    oToday.setFullYear(oToday.getFullYear(), oToday.getMonth(), oToday.getDate(), 0, 0, 0, 0)
    // set field value
    event.value = util.printd("d/mm/yyyy", oToday);
    Custom calculation for the difference in days field (format None):
    var cEnteredDate = this.getField("EnteredDate").value;
    var cToday = this.getField("Today").value;
    event.value = "";
    if(cEnteredDate != "" && cToday != "") {
    // process only if date values not empty
    // convert date strings to date time objectat midnight
    var oEnteredDate = util.scand("d/mm/yyyy", cEnteredDate );
    if (oEnteredDate == null) {
    app.alert("Error in processing entered date", 2, 0);
    oEnteredDate.setFullYear(oEnteredDate.getFullYear(), oEnteredDate.getMonth(),oEnteredDate.getDate(), 0, 0, 0, 0) 
    var oToday = util.scand("d/mm/yyyy", cToday);
    if(oToday ==  null) {
    app.alert("Error converting today", 2,0);
    oToday.setFullYear(oToday.getFullYear(), oToday.getMonth(),oToday.getDate(), 0, 0, 0, 0) 
    // convert date objects to days
    var nEnteredDate = Math.floor(oEnteredDate.getTime() / (1000 * 60 * 60 * 24));
    var nToday = Math.floor(oToday.getTime() / (1000 * 60 * 60 * 24));
    // compute & format the difference
    event.value = util.printf("%,0 1.0f", (nToday - nEnteredDate));

  • A Full DTP is converted into delta DTP and facing some data problem

    Recently Full DTP(DSO to DSO) is converted into delta DTP , we are facing some data problem in first request.Some data in D2 are not updated properly after just converted in full to delta. Please let me know if you have any idea.
    Example :
    DSO : D1
    DSO : D2
    Previously FULL DTP D1->D2
    Now Delta DTP D1->D2

    Hi,
    First time run of delta DTP will extract all the records from the source...
    As u have already run the Full load and followed by delta,i guess u can use direct change log option...
    rgds,

Maybe you are looking for

  • Boot Camp, How to switch back to Mac OS X from Windows?

    I successfully installed boot camp and Vista on my imac so I could watch netflix on my computer (other than that I have no use or patience for Vista or Windows). Now, I am in Windows Vista and am unable to switch back to Mac OS X. I have looked every

  • Servlet Action not found , deploying the war file in Tomcat5.0.28

    Hi, I face the error servletAction ot found , when deplying the war on my system.I am using win98. when I run the struts-blank.war file is working fine . So please help me. I have also another probelm in Netbean 4.1 I fixed the error of out of space

  • BPC 7.0 MS upgrade - reinitiate SSIS packages required

    Hello, We have recently upgraded from BPC 5.1 to BPC 7.0 MS version. We have SSIS package to load Accounts (as flat file), which load the flat file into a staging table and then moved to <mbraccount>. This setup works very fine till in BPC 5.1, after

  • Where is the HD space gone?

    I'm trying to clean up my HD. The info says there is 49.8 GB used, 5.8 GB free. However, when I look at the folders on the HD it is as follows Applications 4.8GB Library 9.5GB System 1.9GB Users 22.1GB ==== Total 38.3GB Where is the remaining 49.8-38

  • Newest Version of ITunes does not work properly

    When playing a game on top of Itunes, or anything that emits sounds, itunes music will skip and sound as if it is being played from a scratched CD, any fix?