c# - Need Help to Converting Delphi Time to .Net Time -


I am porting the Delphi application to C # and I have run into a problem. Delphi App records time in a log file, which then reads back into the program. But the format of the format of that time confuses me. I can not find the Net Library to convert it properly.

The time recorded in Delphi log file: 976129709 (it changes into Delphi code 1/14/2009 5:53:26 PM)

  / / This is the Delphi code that records it: IntToStr (DirInfo.Time); // It is the Delphi code that reads it back in: DateTimeToStr (FileDateToDateTime) (StrToInt (stringTime));  

Anyone have any idea how can I read this in the net?

TSACers of Delphi Time format Old DOS is 32-bit date / time value. As far as I know there is no one in it, for built-in converter, you have to write one. For example:

< Pre> Public State Date Time Deedeted (Int. Doddate) {Int 16 Hi = (Int 16) ((DSADT and 0xFFFF0000) & gt; & gt; 16); Int 16 Lo = (Int 16) (Dozad and 0x0000FFFF); Return to New Datetime ((Hi & amp; 0x3F00) & gt; > 9) + 1980s (Hi & amp; 0xE0)> 5; Hi & amp; 0x1F, (Low & amp; 0xF800) & gt; 11; (Low & amp; 0x7E0 )> 5, (Lo & amp; 0x1F) * 2);}

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -