Formats a duration of time as a time string for a locale specified by identifier
#include <WinAPILocale.au3>
_WinAPI_GetDurationFormat ( $iLCID, $iDuration [, $sFormat = ''] )
$iLCID | The locale identifier (LCID) that specifies the locale or one of the following predefined values: $LOCALE_INVARIANT $LOCALE_SYSTEM_DEFAULT $LOCALE_USER_DEFAULT Windows Vista or later $LOCALE_CUSTOM_DEFAULT $LOCALE_CUSTOM_UI_DEFAULT $LOCALE_CUSTOM_UNSPECIFIED |
$iDuration | The number of 100-nanosecond intervals in the duration. Alternatively, this parameter can be a $tagSYSTEMTIME structure that contains the time duration information to format. |
$sFormat | [optional] The string that is used to form the duration. For example, "hh:mm:ss.ff". If this parameter is omitted or an empty string (Default), the function returns the string according to the duration format for the specified locale. |
Success: | The formatted duration string. |
Failure: | Empty string, call _WinAPI_GetLastError() to get extended error information. |
This function requires Windows Vista or later.
Search GetDurationFormat in MSDN Library.
#include <WinAPILocale.au3>
Local $iDuration = (90 * 60 + 14) * 1000 * 1000 * 10
ConsoleWrite(_WinAPI_GetDurationFormat(0, $iDuration, 'hh:mm:ss') & @CRLF)
ConsoleWrite(_WinAPI_GetDurationFormat(0, $iDuration, 'mm:ss') & @CRLF)
ConsoleWrite(_WinAPI_GetDurationFormat(0, $iDuration, 'ss') & @CRLF)