Cicode Programming Reference > Cicode Function Categories > Time and Date Functions Introduction > TimeSet

TimeSet

Sets the new system time. You can set the time only on the computer which this function is called.

Time/date functions can only be used with dates from 1980 to 2035.

If you call TimeSet without the required privileges to change the system time you will receive a hardware alarm indicating this.

Note: that when using Vista, UAC needs to be disabled in order for the time to be set.

Syntax

TimeSet(Time)

Time:

The time/date variable to which the new time is set. Sets the time on this computer only.

Return Value

The error status of the set

Related Functions

DateInfo

Example

! set the time to 11:43 on June 23 1993
time = StrToTime("11:43:00") + StrToDate("23/6/93");
TimeSet(time);.

See Also

Time/Date Functions