Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Retrieves the current local date and time.
To retrieve the current date and time in Coordinated Universal Time (UTC) format, use the GetSystemTime function.
void GetLocalTime(
[out] LPSYSTEMTIME lpSystemTime
);
[out] lpSystemTime
A pointer to a SYSTEMTIME structure to receive the current local date and time.
None
To set the current local date and time, use the SetLocalTime function.
For an example, see SYSTEMTIME.
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps | UWP apps] |
Minimum supported server | Windows 2000 Server [desktop apps | UWP apps] |
Target Platform | Windows |
Header | sysinfoapi.h (include Windows.h) |
Library | Kernel32.lib |
DLL | Kernel32.dll |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today