Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Valid Date of Birth Entered?
Message
From
19/12/2007 14:45:02
 
 
To
19/12/2007 14:21:23
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01276653
Message ID:
01276662
Views:
27
This message has been marked as the solution to the initial question of the thread.
If Century is set on, don't they have to enter a 4 digit year?

otherwise, are you looking for something like:

if Year(dtofBirth) > Year(date())
dtofBirth = ctod(alltrim(str(Month(dtofBirth))) + ;
alltrim(str(Day(dtofBirth))) + ;
alltrim(str(Year(dtofBirth)-100)))
endif

>A user can enter 2 or 4 digit value for the year section in a datetime field: (i.e. 01/01/01 or 01/01/2001)
>
>1. If the year is in the future, invalid - set to same date in previous century (i.e. 08 entered, make it 1908, or 2008 entered, make it 1908).
>2. If the year is between the current century and the current year (2000/00 to 2007/07), assume this century.
>3. If the year is greater than the current year, set it to the same date in the previous century.
>
>For some reason I am not getting this today. It should be so very very simple...
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform