Skip to content

DateTime.Now function

Douglas Lyman edited this page Nov 28, 2022 · 5 revisions

Gets the current local date and time.

Syntax

static DateTime Now();

Returns

A DateTime object with it's fields set to the current local date and time.

Example

#include "DateTime.h"

int main() {
    DateTime time = DateTime::Now();
    printf("[%00hu:%00hu:%00hu]", time.wHours, time.wMinutes, time.wSeconds); // Will print the local time as following: [hh:mm:ss]
}

Requirements

Header DateTime.h
Assembly Artemis-API.lib