Set Hours, Hours

Sets the time to 12- or 24-hour format for the clock display and also for the entry and display of datetime fields. Hours is a property of text boxes that lets you set an individual text box to be different from the rest of the application. In either case, full accuracy is retained in the data that is stored; the command and property specify only a display picture.
Usage
SET HOURS TO [ 12 | 24 ]
cTime = SET( "HOURS" )
TextBox.Hours = 0 | 12 | 24
Issuing SET HOURS TO with no argument resets it to the default 12-hour setting. SET HOURS and the Hours property affect only datetimes and FoxPro's built-in system clock. Other functions, like TIME(), continue to return the same values.Setting Hours to 0 (the default) uses the SET HOURS setting.

Example

SET HOURS TO 12
ThisForm.txtSample.Hours = 12

See Also

DateTime(), Set Clock, Set SysFormats, TextBox, Time()


Back to Table of Contents

Copyright © 2002-2018 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. Click for license .