# Current DateTime
Flags —
Native
|Function
Returns the best guess of the current time for players in the real world as a server-timezone adjusted DateTime.
Returns — datetime
native datetime CurrentDateTimeGet();
# Related
Category: DateTime
- [F] —
int
— Convert DateTime To Integer — ( DateTimeToInt ) - [F] —
datetime
— Convert Integer To DateTime — ( IntToDateTime ) - [F] —
string
— Convert DateTime To String — ( DateTimeToString ) - [F] —
datetime
— Convert String To DateTime — ( StringToDateTime ) - [F] —
datetime
— Current DateTime — ( CurrentDateTimeGet ) - [F] —
datetime
— Initial DateTime — ( InitialDateTimeGet ) - [F] —
int
— Get DateTime Year — ( GetDateTimeYear ) - [F] —
int
— Get DateTime Month — ( GetDateTimeMonth ) - [F] —
int
— Get DateTime Day — ( GetDateTimeDay ) - [F] —
int
— Get DateTime Hour — ( GetDateTimeHour ) - [F] —
int
— Get DateTime Minute — ( GetDateTimeMinute ) - [F] —
int
— Get DateTime Second — ( GetDateTimeSecond ) - [F] —
int
— Get DateTime Weekday Index — ( GetDateTimeWeekday ) - [F] —
int
— Synchronous Game Start Time — ( SynchronousGameStartTimeGet ) - [F] —
int
— Current Synchronous Game Time — ( CurrentSynchronousGameTimeGet ) - [F] —
string
[ preset::Weekday ] — Get Current Day of Week — ( libNtve_gf_GetCurrentDayofWeek ) - [F] —
bool
— DateTime is Before — ( DateTimeIsBefore ) - [F] —
bool
— DateTime is After — ( DateTimeIsAfter ) - [F] —
bool
— DateTime is Between — ( libNtve_gf_DateTimeisBetween ) - [F] —
string
[ preset::Weekday ] — Get Weekday From DateTime — ( libNtve_gf_GetWeekdayFromDateTime ) - [F] —
string
[ preset::Month ] — Get Month From DateTime — ( libNtve_gf_GetMonthFromDateTime ) - [F] —
bool
— DateTime is Weekend — ( libNtve_gf_DateTimeisWeekend ) - [F] —
bool
— DateTime is Morning — ( libNtve_gf_DateTimeisMorning ) - [F] —
bool
— DateTime is Afternoon — ( libNtve_gf_DateTimeisAfternoon ) - [F] —
bool
— DateTime is Evening — ( libNtve_gf_DateTimeisEvening ) - [F] —
string
— Format DateTime as String — ( libNtve_gf_FormatDateTimeasString ) - [P] — Weekday
- [P] — Month
# Examples
# mods/core.sc2mod
// L2375
CurrentDateTimeGet()
# mods/liberty.sc2mod
// L956
CurrentDateTimeGet()