The views expressed on this weblog are mine alone and do not necessarily reflect the views of my employer.
 Tuesday, August 05, 2003
Converting to a DateTime from time_t

Oo! Good stuff…I need a copy for myself…

This code just went by an internal alias and I thought I’d record it here.

public static DateTime Time_T2DateTime(uint time_t)
{
    long win32FileTime = 10000000*(long)time_t + 116444736000000000;
    return DateTime.FromFileTimeUtc(win32FileTime);
}

[Brad Abrams]


Updated Link to this post 2:05:04 PM  #    comment []  trackback []