Function Reference


_Date_Time_SystemTimeToDateTimeStr

Decode a system time to a date/time string

#include <Date.au3>
_Date_Time_SystemTimeToDateTimeStr ( ByRef $tSYSTEMTIME [, $iFmt = 0] )

Parameters

$tSYSTEMTIME $tagSYSTEMTIME structure
$iFmt [optional] 0 returns mm/dd/yyyy hh:mm:ss (Default)
1 returns yyyy/mm/dd hh:mm:ss

Return Value

Returns a date/time string formatted according to $bFmt.

Related

$tagSYSTEMTIME, _Date_Time_SystemTimeToDateStr, _Date_Time_SystemTimeToTimeStr

Example

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

Global $g_idMemo

Example()

Func Example()
    Local $tTime

    ; 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 system date/time
    $tTime = _Date_Time_GetSystemTime()
    MemoWrite("System date/time .: " & _Date_Time_SystemTimeToDateTimeStr($tTime))
    MemoWrite("System date/time .: " & _Date_Time_SystemTimeToDateTimeStr($tTime, 1))

    ; 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