Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Advice on Functions To Test For Valid Dates

Status
Not open for further replies.

drosenkranz

Programmer
Sep 13, 2000
360
0
0
US
It's late and I'm tired and I want my VB back. Haven't had to use FoxPro since '92. I know this is a pretty basic question but how would you evaluate a user's entry to see if its a valid date?

Can you do it with and without the CTOD function? Thanks

 
Fox automatically evaluates if its a valid date.

Dario
 
If ldMyDate is a date-type value, then you could check it like this:

[tt]day(ldMyDate) > 0[/tt]

If lcMyDate is character type, then try this:

[tt]ctod(day(lcMyDate)) > 0[/tt]


Robert Bradley

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top