SetSystemTime
- Last UpdatedOct 29, 2026
- 1 minute read
Sets the time in the operating system's clock.
|
Function |
Group |
Execution |
String Exp. |
Windows |
Windows Embedded |
IoT View |
Thin Clients |
Mobile Access |
|---|---|---|---|---|---|---|---|---|
|
SetSystemTime |
Date and Time |
Synchronous |
No |
Supported |
Supported |
Not supported |
Supported |
Not supported |
Syntax
SetSystemTime(strTime)
strTime
A string or string tag containing the time (in HH:MM:SS format) to set the clock.
Return value
|
Value |
Description |
|---|---|
|
1 |
Success |
|
0 |
Failure |
Notes
For this function to be executed successfully and change the system settings, you must run Edge HMI with Administrator privileges. To run as an administrator once, right-click the program icon and then click Run as administrator on the shortcut menu. To always run as an administrator, open the program's Properties dialog box, click the Compatibility tab, and then select the Run this program as an administrator check box.
Examples
Set the system clock to 3:45:18 PM:
SetSystemTime("15:45:18")