Valhalla Legends Forums Archive | Java Programming | How to use FILETIME (src)

AuthorMessageTime
iago
Here is a little function (I calculated the number by hand, and I *think* it's right, since a google search on it gets hits):

[code] public static long fileTimeToMillis(long fileTime)
{
return (fileTime / 10000L) - 11644473600000L;
}
[/code]

From there, you can use it just like any Java time:
[code]
java.util.Date myDate = new java.util.Date(fileTimeToMillis(myFileTime));
[/code]
March 4, 2004, 9:21 PM

Search