Sign in to follow this  
Followers 0
rasim

Dos DateTime to a readable FileTime string

5 posts in this topic

Hi, how to convert Dos DateTime like this 956009454 to a File Time?

Share this post


Link to post
Share on other sites



Hi, how to convert Dos DateTime like this 956009454 to a File Time?

Where do you get that value from?

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Where do you get that value from?

Mega

This value returned from unrar.dll function.

Share this post


Link to post
Share on other sites

This value returned from unrar.dll function.

Okay, and what is it? Sec, min? Sec from 01.01.1970?

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Maybe this will help you.

I used it in my FTP project to convert filetime stored in low/high dword returned from _FtpFileFindFirst/_FtpFileFindNext

Global $rfiletime = DllStructCreate("dword;dword")
Global $pfiletime = DllStructGetPtr($rfiletime)
Global $rsystemtime = DllStructCreate("short;short;short;short;short;short;short;short")
Global $psystemtime = DllStructGetPtr($rsystemtime)

Func FormatFileTime($low, $high); yyyymmddhhmmss
 DllStructSetData($rfiletime,1,$low)
 DllStructSetData($rfiletime,2,$high)
 
 DllCall("Kernel32.dll", "int", "FileTimeToSystemTime", "ptr", $pfiletime, "ptr", $psystemtime)

 Return StringFormat("%04d%02d%02d%02d%02d%02d", _
    DllStructGetData($rsystemtime,1), _
    DllStructGetData($rsystemtime,2), _
    DllStructGetData($rsystemtime,4), _
    DllStructGetData($rsystemtime,5), _
    DllStructGetData($rsystemtime,6), _
    DllStructGetData($rsystemtime,7))
EndFunc

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0