CREATE TABLE

Set Seconds, Set("Seconds"), Seconds

This setting and property determine whether datetime output includes the seconds portion of the time. The function returns the current setting.

Usage

SET SECONDS ON | OFF cOnOrOff = SET( "SECONDS" ) txtTextbox.Seconds = nSecondsSetting nSecondsSetting = txtTextbox.Seconds

Parameter

Value

Meaning

nSecondsSetting

0

Don't show seconds.

1

Show seconds.

2

Use SET SECONDS setting.


As in so many places in VFP, the SET command here is global (actually, data session wide), while the property is local.

SET SECONDS also affects conversion of datetimes with TTOC(). When SECONDS is OFF, the converted value doesn't include the seconds portion. This setting doesn't affect precision going the other direction, though. CTOT("12/31/1999 23:59:59") always stores the seconds internally, regardless of the SECONDS setting.

Example

SET SECONDS ON    && Default value ? DATETIME()      && Displays 09/15/95 04:30:21 PM SET SECONDS OFF ? DATETIME()      && Displays 09/15/95 04:30 PM   This.Seconds = 1  && Turn on seconds in text box code

See Also

DateTime(), Hours, Set Hours, TToC()


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net