Function Reference


_Date_Time_DOSDateTimeToArray

Decode a DOS date/time to an array

#include <Date.au3>
_Date_Time_DOSDateTimeToArray ( $iDosDate, $iDosTime )

Parameters

$iDosDate 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)
$iDosTime MS-DOS date, 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)

Return Value

Returns an array with the following format:
    [0] - Month
    [1] - Day
    [2] - Year
    [3] - Hour
    [4] - Minute
    [5] - Second

Related

_Date_Time_DOSDateToArray, _Date_Time_DOSTimeToArray

Example

#include "Extras\HelpFileInternals.au3"

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

Example()

Func Example()
    Local $aDate

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

    ; Show FAT date/time
    $aDate = _Date_Time_DOSDateTimeToArray(0x3621, 0x944a) ; 01/01/2007 18:34:20
    _MemoWrite("FAT date .: " & StringFormat("%02d/%02d/%04d", $aDate[0], $aDate[1], $aDate[2]))
    _MemoWrite("FAT time .: " & StringFormat("%02d:%02d:%02d", $aDate[3], $aDate[4], $aDate[5]))

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