ZenoTest
ZenoTest — Windows desktop UI test automation for Qt, WPF, WinForms & native apps. Record, script, and run automated GUI tests with CI/CD integration.

GetCurrentDate

string GetCurrentDate(string format)

Description
Returns the current local date as a formatted string.
The format parameter uses strftime-style specifiers to define the output layout.

Parameter
- format - A format string using the following specifiers:

| Specifier | Description | Example |
|-----------|-------------|---------|
| %Y | 4-digit year | 2025 |
| %y | 2-digit year | 25 |
| %m | Month (01–12) | 05 |
| %d | Day (01–31) | 08 |
| %B | Full month name | May |
| %b | Abbreviated month name | May |
| %A | Full weekday name | Thursday |
| %a | Abbreviated weekday name | Thu |
| %j | Day of year (001–366) | 128 |

Returns
The current date formatted as a string.

Example
void main()
{
    string d1 = GetCurrentDate("%Y-%m-%d");   // e.g. "2025-05-08"
    string d2 = GetCurrentDate("%d.%m.%Y");   // e.g. "08.05.2025"
    string d3 = GetCurrentDate("%A, %d %B %Y"); // e.g. "Thursday, 08 May 2025"
}
#define #include abs Array ceil CloseAUT Console mode do...while DoubleClick DragAndDrop Execute Fail File floor for Format GetAUTFileVersion GetAUTProductVersion GetAUTQtVersion GetAUTSuspectedCompiler GetAUTSuspectedFramework GetClipboard GetCurrentDate GetCurrentTime GetCurrentWorkingDir GetEnv GetName GetProcessID GetProcessIDHandle GetQtProperty GetText GetTimestamp GetValue Handle HasFocus IsAUT64Bit IsChecked IsEnabled IsVisible LeftMouseClick LeftMouseDown LeftMouseUp max MiddleMouseClick MiddleMouseDown MiddleMouseUp min MouseMove MouseWheel Pass pow Predefined Constants Print rand Regex RegexMatch RightMouseClick RightMouseDown RightMouseUp round Script Language SendKeys SendMessage SetClipboard SetFocus SetNotFoundBehavior SetQtProperty ShellProcess Sleep sqrt srand StartAUT string TerminateProcess TimerStart TimerStop TimerVerifyLess vec2d VerifyContains VerifyEmpty VerifyEndsWith VerifyEqual VerifyExists VerifyFalse VerifyGreater VerifyGreaterEqual VerifyLess VerifyLessEqual VerifyNotEqual VerifyNotExists VerifyScreenCompareEdgeBased VerifyScreenComparePixelExact VerifyStartsWith VerifyTrue WaitForControl WaitUntilEnabled WaitUntilVisible while