Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Clipper Tools One Guide - <b>timevalid()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
TIMEVALID()

Syntax:     TIMEVALID(<expC>)

Arguments:  <expC> is a string which contains a time detail to be tested.

Returns:    A logical value.
            (.T.) is returned when <expC> is a valid time string;
            otherwise (.F.) is returned.

Usage:      TIMEVALID() can be used in the Clipper VALID clause for
            data input.

Notes:      Please note the formats for the time details.  Two digits for
            hours, minutes, seconds and hundredths, otherwise the time
            input will be considered as invalid.  The following examples,
            for instance, would be valid "12", "12:59", "12:59:59" and
            "12:59:59:99".  These next examples would be invalid: "13",
            "12:60", "12:1" and also "12:".  If time strings which have not
            been completely filled are used, and it is necessary to check
            with TIMEVALID(), the TRIM the time string before using
            the TIMEVALID() function (see also the following examples).

Library:    CT1.LIB


--------------------------------- Example ------------------------------

Examples:   start = SPACE(11)

            * To accept valid times including hours,
            * minutes, seconds and hundredths.
            @ 5,10 SAY "IN = operation start:" ;
                        GET start VALID TIMEVALID(TRIM(start))
            READ

            or:

            start = SPACE(5)

            * To accept any valid time for hours and
            * minutes only.
            @ 5,10 SAY "IN = operation start:" ;
                        GET start VALID TIMEVALID(TRIM(start))
            READ




Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson