Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Function to return a valid date
Message
From
08/11/2001 09:08:15
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
08/11/2001 07:24:22
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00578964
Message ID:
00579017
Views:
36
>Hello friends,
>
>I would like to ask whether there is a way (function or something) which can determine that a specific string contains a valid date for instance :
>isvaliddate("20011101") would return .t.
>
>Thank you
>Dimitris

Your string looks like to be in YYYYMMDD format.
function IsValidDate
lparameters tcString
return !empty(ctod(trans(tcString,'@R ^9999/99/99')))
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