Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Borislav Borissov
  Where is Borislav Borissov?
 Sofia
 Bulgaria
 Borislav Borissov
 To: mk sharma
  Where is mk sharma?
 mumbai
 India
 mk sharma
 Tags
Subject: RE: date like MM/YYYY
Thread ID: 104249 Message ID: 104251 # Views: 3 # Ratings: 0
Version: Visual FoxPro 9 Category: Forms
Date: Monday, August 14, 2006 10:10:03 AM         
   


> i want to add a date like MM/YYYY
> i required this for expiry date of medician.
>
> warm regards,
> mk.


Where is DAY portion? If you want just to add month and year in that format try this:
Add a TextBox in you form. Set its InputMask to: ##/####. In Valid/LostFocus Event or there wher you validate Entry Data put:
LOCAL lnMnt, lnYear
lnMnt  = VAL(LEFT(thisform.TextBoxName.Value,2))
lnYear = VAL(RIGHT(thisform.TextBoxName.Value,4))
IF NOT BETWEEN(lnMnt, 1, 12)
   MessageBox([Month number is not correct])
   RETURN .f.
ENDIF
IF lnYear < 1900 && Or any other year you want
   MessageBox([Year number is not correct])
   RETURN .f.
ENDIF


Borislav Borissov



ENTIRE THREAD

date like MM/YYYY Posted by mk sharma @ 8/14/2006 10:03:25 AM
RE: date like MM/YYYY Posted by Martin Sellwood @ 8/14/2006 10:05:19 AM
RE: date like MM/YYYY Posted by Borislav Borissov @ 8/14/2006 10:10:03 AM
RE: date like MM/YYYY Posted by Ken Murphy @ 8/16/2006 2:48:37 PM