uwpHow to get current DateTime in C++ UWP


Introduction

The documentation for the DateTime::UniversalTime states:

"A 64-bit signed integer that represents a point in time as the number of 100-nanosecond intervals prior to or after midnight on January 1, 1601 (according to the Gregorian Calendar)."

This is the same as the Win32 FILETIMEstruct which you need to convert to a 100-nanosecond long long value and set it in the DateTime::UniversalTime field.