Decode a DOS date to an array
#include <Date.au3>
_Date_Time_DOSDateToArray ( $iDosDate )
$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) |
_Date_Time_DOSDateTimeToArray, _Date_Time_DOSTimeToArray
#include <Date.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Global $g_idMemo
Example()
Func Example()
Local $aDate
; Create GUI
GUICreate("Time", 400, 300)
$g_idMemo = GUICtrlCreateEdit("", 2, 2, 396, 296, $WS_VSCROLL)
GUICtrlSetFont($g_idMemo, 9, 400, 0, "Courier New")
GUISetState(@SW_SHOW)
; Show FAT date
$aDate = _Date_Time_DOSDateToArray(0x3621) ; 01/01/2007
MemoWrite("FAT date .: " & StringFormat("%02d/%02d/%04d", $aDate[0], $aDate[1], $aDate[2]))
; Loop until the user exits.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc ;==>Example
; Write a line to the memo control
Func MemoWrite($sMessage)
GUICtrlSetData($g_idMemo, $sMessage & @CRLF, 1)
EndFunc ;==>MemoWrite