Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Suvi Joseph
  Where is Suvi Joseph?
 Bangalore
 India
 Suvi Joseph
 To: Tay Chin Phang
  Where is Tay Chin Phang?
 Sarawak
 Malaysia
 Tay Chin Phang
 Tags
Subject: RE: date problem
Thread ID: 15797 Message ID: 15798 # Views: 1 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Tuesday, October 01, 2002 7:26:07 AM         
   


> hello,
>
> can sameone tell me how can i check whether the date entering is valid or not
> eg. the month is between 1-12 and each month have how many day.
> can sameone tell me how was the coding or any method that i can check it so the program will display out the message if the date is invalid.
>
> thank

If you are talking about in VFP, you can simply do this way:
1. Put a variable, lets say 'date1' in the text box's Controlsource property
2. Enter D in the Foramt property of the text box.
3. put this code
 date1=ctod("  /  /  ") 
in the init event of your form. and say
 thisform.refresh 

If you run this. It will automatically take the valid date. If you have any difficulty in doing this. Let me know.
Regards,
Suvi Joseph

ENTIRE THREAD

date problem Posted by Tay Chin Phang @ 10/1/2002 6:52:45 AM
RE: date problem Posted by Suvi Joseph @ 10/1/2002 7:26:07 AM
RE: date problem Posted by Tay Chin Phang @ 10/1/2002 9:22:47 AM
RE: date problem Posted by Suvi Joseph @ 10/1/2002 2:10:34 PM
RE: date problem Posted by Tay Chin Phang @ 10/2/2002 9:24:18 AM
RE: date problem Posted by Suvi Joseph @ 10/2/2002 10:11:19 AM
RE: date problem Posted by Yu-Wah Cheung @ 10/2/2002 6:19:05 PM