Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Validate date in a save method
Message
From
11/04/2007 10:42:25
 
 
To
11/04/2007 10:12:33
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01214399
Message ID:
01214428
Views:
21
It may be a numeric field but what I want is a date for the field on the screen. The Format "KD'puts in the " / / ". What I want to do is check that user entered a valid date.

Is there in "inputmask" that forces the input to be in the correct format, i.e. "mm/dd/yyyy"? If nor how do I check the input?

>PMFJI,
>but are you sure that field is a date field?
>that looks like something a numeric field with input mask would allow.
>
>>It is letting me enter values like 66/44/9999 which is an invalid date.
>>
>>>>I have as a "Save" button. In the click method of the button I want to be be sure a field is a valid date, i.e. nn/mm/yyyy where nn is a valid month, mm is a valid day and yyyy is a valid year.
>>>>
>>>>The format of the field is KD.
>>>>
>>>>How can I do that?
>>>
>>>If you set format as D, then the field would be automatically validated.
>>>
>>>Otherwise you may look at the special date class I developed:
>>>Re: Replacing VFP's Invalid Date message Thread #1131737 Message #1131791
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform