Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Validate Time Format
Message
From
17/03/2002 16:15:54
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00625685
Message ID:
00633933
Views:
19
>>I have a table with a date field (D8) and a time field (C5 - HH:MM). Does Fox have a function to validate just the time field? I don't want to concatenate the fields, I need them to be separate.
>>
>>TIA!
>
>You can check it this way
 IF EMPTY(Ctot("01/01/2002 " + timefiled ))
>  * Time is incorrect
>ELSE
>ENDIF
It also depends on your definition of what is the valid time value in that field.

Sergey,

I was searching for some date validation stuff... and found this thread... does the above mean
lcTest = "35/35/2002"

IF EMPTY( CTOD(lcTest))
  ** This date is bad???
ELSE
 ** This date is good???
ENDIF
So, to validate a string to date, just ask if is empty outside the conversion function??

TIA

Ric
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform