View source code
Display the source code in std/datetime/systime.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Function std.datetime.systime.SysTimeToDosFileTime

Converts from SysTime to DOS file date/time.

uint SysTimeToDosFileTime (
  scope SysTime sysTime
) @safe;


sysTime The SysTime to convert.


DateTimeException if the given SysTime cannot be converted to a DosFileTime.


import : DateTime;

// 0b00000000001000010000000000000000
writeln(SysTimeToDosFileTime(SysTime(DateTime(1980, 1, 1, 0, 0, 0))));
// 0b11111111100111111011111101111101
writeln(SysTimeToDosFileTime(SysTime(DateTime(2107, 12, 31, 23, 59, 58))));
writeln(SysTimeToDosFileTime(SysTime(DateTime(2011, 1, 31, 16, 34, 44)))); // 0x3E3F8456


Jonathan M Davis


Boost License 1.0.