Function Reference


_Date_Time_FileTimeToDOSDateTime

Converts MS-DOS date and time values to a file time

#include <Date.au3>
_Date_Time_FileTimeToDOSDateTime ( $tFileTime )

Parameters

$tFileTime a $tagFILETIME structure containing the file time to convert to MS-DOS format or a pointer to it

Return Value

Returns an array with the following format:
    [0] - MS-DOS date, packed as follows:
        Bits 0- 4 Day of the month (1–31)
        Bits 5- 8 Month (1 = January, 2 = February, and so on)
        Bits 9-15 Year offset from 1980 (add 1980 to get actual year)
    [1] - MS-DOS time, packed as follows:
        Bits 0- 4 Second divided by 2
        Bits 5-10 Minute (0–59)
        Bits 11-15 Hour (0–23 on a 24-hour clock)

Related

$tagFILETIME, _Date_Time_DOSDateTimeToFileTime, _Date_Time_FileTimeToLocalFileTime, _Date_Time_FileTimeToSystemTime

Example

#include "Extras\HelpFileInternals.au3"

#include <Date.au3>
#include <GUIConstantsEx.au3>
#include <WindowsStylesConstants.au3>

Example()

Func Example()
    Local $tFile, $aDOS

    ; Create GUI
    GUICreate("Time", 400, 300)
    _MemoCreate(2, 2, 396, 296, $WS_VSCROLL)
    GUISetState(@SW_SHOW)

    ; Encode a file time
    $tFile = _Date_Time_EncodeFileTime(@MON, @MDAY, @YEAR, @HOUR, @MIN, @SEC)
    $aDOS = _Date_Time_FileTimeToDOSDateTime($tFile)
    _MemoWrite("DOS date .: 0x" & Hex($aDOS[0], 4))
    _MemoWrite("DOS time .: 0x" & Hex($aDOS[1], 4))

    ; Loop until the user exits.
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc   ;==>Example