Microsoft® JScript™
setHours Method
Language Reference |
Version 1 |

See Also                  Applies To


Description

Modifies the hours stored in the Date object.

Syntax
dateObj.setHours(numHours)

The numHours argument is a numeric value equal to the hours value.

Remarks

If the value of numHours is greater than 23 or is a negative number, the stored date is incremented an appropriate number of days. For example, if the stored date is "Jan 5, 1996 00:00:00", and setHours(30) is called, the date is changed to "Jan 6, 1996 06:00:00." Negative numbers have a similar behavior.


© 1997 Microsoft Corporation. All rights reserved.