GetSystemTime

 

Description

This function retrieves the current system date and time. The system time is expressed in Coordinated Universal Time (UTC).

Syntax

void GetSystemTime( SYSTEMTIME * lpSystemTime )

Parameters

lpSystemTime
[output] pointer to the SYSTEMTIME struct to receive the date and time

Return

Examples

EX1

int GetSystemTime_ex1()
{
    SYSTEMTIME sysTime;
    char lpcstrTime[100];
    GetSystemTime(&sysTime);
    
    if(systemtime_to_date_str(&sysTime, lpcstrTime))
        printf("Today's date & time in your Origin custom date format(1) = \"%s\"\n",lpcstrTime);
    return 1;
}

Remark

See Also

SetFileTime, FileTimeToSystemTime, SystemTimeToJulianDate

header to Include

origin.h

Reference