Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining Dates (again)
Message
From
19/09/2008 17:06:46
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Determining Dates (again)
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01349136
Message ID:
01349136
Views:
51
I'm playing around with trying to determine if a character string is actually a date. The only way dates come into this is CCYYMMDD, so it makes it a little easier. I know this isn't good enough to exclude all non-dates from being converted. What else can I do?
CASE ;
	BETWEEN(VAL(SUBSTR(m.FormatFieldValue,1,4)),1900,2050) ;
	AND BETWEEN(VAL(SUBSTR(m.FormatFieldValue,5,2)),1,12) ;
	AND BETWEEN(VAL(SUBSTR(m.FormatFieldValue,7,2)),1,31)
	oDetails.FieldVal = ConvertFormat('D8',m.FormatFieldValue)
Next
Reply
Map
View

Click here to load this message in the networking platform