# Get Month From DateTime

Grammardatetime month
FlagsFunction

Returns the month of a DateTime.

# Arguments

  • datetime — DateTime

Returns — string<preset::Month>

string libNtve_gf_GetMonthFromDateTime(
	datetime lp_datetime,
);

Category: DateTime

# Examples

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:2548

    // Implementation
    if ((lv_hourIndex >= 12)) {
        return ((libNtve_gf_GetWeekdayFromDateTime(lp_datetime)) + ", " + (libNtve_gf_GetMonthFromDateTime(lp_datetime)) + " " + IntToString(GetDateTimeDay(lp_datetime)) + ", " + IntToString(GetDateTimeYear(lp_datetime)) + ", " + IntToString(lv_displayHour) + ":" + IntToString(GetDateTimeMinute(lp_datetime)) + ":" + IntToString(GetDateTimeSecond(lp_datetime)) + " PM");
    }
    else {

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:2551

    }
    else {
        return ((libNtve_gf_GetWeekdayFromDateTime(lp_datetime)) + ", " + (libNtve_gf_GetMonthFromDateTime(lp_datetime)) + " " + IntToString(GetDateTimeDay(lp_datetime)) + ", " + IntToString(GetDateTimeYear(lp_datetime)) + ", " + IntToString(lv_displayHour) + ":" + IntToString(GetDateTimeMinute(lp_datetime)) + ":" + IntToString(GetDateTimeSecond(lp_datetime)) + " AM");
    }
}