Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Check For Valid Date Before VFP
Message
From
24/01/2003 11:33:59
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00745078
Message ID:
00745104
Views:
72
Allan, If the control source is a date field then VFP will check its contents according to the current SET DATE setting. If you do not want VFP to check the date then you need to bypass it by making it a char field instead and then doing your own date formating and checking.

The other possible option is to make sure you SET DATE to the user selected preference. But even then if the user enters an invalid date then I think VFP will give a warning.


>Jos,
>
>The control source is a date field in a table.
>Would your suggestion work?
>
>
>>Allan, can you change the field to char instead of date? Then check the validity of the char field according to user setting and then store into your date field with appropiate convertion function.
>>
>>
>>>I have an object with a format of 'KD' and would like to be to check for a valid date before VFP 7 displays its 'invalid date' in a wait window.
>>>The reason is that I would like to generate all validation type messages in our own formatted message box.
>>>Since the user is going to define the format of the date in the application's preferences, the date could be in one of several different format.
>>>What is the easiest way to accomplish this task?
>>>TIA.
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform