Jump to content

Dos DateTime to a readable FileTime string


 Share

Recommended Posts

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

Link to comment
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

Link to comment
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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...