Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Year 0000
Message
De
14/04/2005 13:15:31
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01003937
Message ID:
01004765
Vues:
15
This message has been marked as the solution to the initial question of the thread.
>>>My question is how to trap years less than 1900 in valid of the textbox. It seems like this year is converted to 1900 by VFP... Try to play with form and textbox which is date type.
>>
>>Can you explain better ?
>
>Create a test form. Put textbox on a form and set its value to =date(10,15,1965). Now run the form and try to change year to 0000. The "Invalid date" message would appear only when you put 1/1/0000 or any date less than 03/01/0000 (I'm using SET DATE TO American). But when you click on this textbox again you'll see, that the year automatically was converted to 1900 if you put something like 3/2/0000.
>
>In my date class I want to trap all years less than currrent year - 110 and display a message. Yesterday I tried to implement it, but it didn't work. However, I spent ~ 5 minutes on it because it was at the end of the day. If you have ideas how to achieve my goal, they are more than welcommed, otherwise I'll start playing with it myself.
* RangeLow
RETURN GOMONTH(DATE(),-110*12) && this is the lowerBound
** Class RangeLow
IF m.this.Value<m.this.RangeLowBound && ADD THIS PROPERTY
   MESSAGEBOX("Error ... blb bls ...")
ENDIF
RETURN m.this.RangeLowBound
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform