You might start at FILETIME structure and investigate from there if you want to correct your program.

Also check the CodeBank here, since code to call the related APIs including converstion to/from localized times in VB6 Date type format have been published there many times.