MSDN

FILETIME Structure

The FILETIME structure represents the number of 100‑nanosecond intervals since January 1, 1601 (UTC). It is used throughout the Windows API to specify timestamps.

Syntax

#include <windows.h>

typedef struct _FILETIME {
    DWORD dwLowDateTime;
    DWORD dwHighDateTime;
} FILETIME, *PFILETIME, *LPFILETIME;

Members

MemberDescription
dwLowDateTimeLow-order 32 bits of the file time.
dwHighDateTimeHigh-order 32 bits of the file time.

Remarks

Example (C++)

#include <windows.h>
#include <iostream>

int main() {
    FILETIME ft;
    // Get the current system time as FILETIME
    GetSystemTimeAsFileTime(&ft);

    // Convert to a readable format
    SYSTEMTIME stUTC, stLocal;
    FileTimeToSystemTime(&ft, &stUTC);
    SystemTimeToTzSpecificLocalTime(nullptr, &stUTC, &stLocal);

    std::cout << "Current local time: "
              << stLocal.wMonth   << '/' << stLocal.wDay << '/' << stLocal.wYear << " "
              << stLocal.wHour    << ':' << stLocal.wMinute << ':' << stLocal.wSecond << std::endl;
    return 0;
}

See Also