Function Reference


_SetDate

Sets the current date of the system

#include <Date.au3>
_SetDate ( $iDay [, $iMonth = 0 [, $iYear = 0]] )

Parameters

$iDay Day of the month. Values: 1-31
$iMonth [optional] month. Values: 1-12
$iYear [optional] year. Values: > 0 (windows might restrict this further!!)

Return Value

Success: 1.
Failure: 0 and sets the @error flag to non-zero.
@error: 1 - Failure
@extended: _WinAPI_GetLastError()
Error code(s): MSDN: ms681381.aspx

Remarks

If the optional parameters ($iMonth,$iYear) are NOT defined, the function will not change the current value!

Related

_SetTime

See Also

Search GetLastError in MSDN Library.

Example

#include <Date.au3>

_SetDate(20) ; Set the current date to 20-xx-xxxx
_SetDate(20, 10) ; Set the current date to 20-10-xxxx
_SetDate(20, 10, 2004) ; Set the current date to 20-10-2004