Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to validate dates? (month and day only)
Message
From
29/12/2000 09:48:59
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00457589
Message ID:
00457737
Views:
27
>A user enters a day in a spinner. They then choose a month from a combobox. They do not enter a year. Is there an
>easy way to tell if the month/day combination is valid?

Joe,
If it's kind of 'On every 23rd of June' thing then you could check :
isValid=!empty(date(1999,lnMonth,lnDay))

Otherwise :
isValid=!empty(date(2000,lnMonth,lnDay)) ;
and iif(lnDay=29 and lnMonth=2,HandleFeb29(),.t.)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform