# Get Weekday From DateTime

Grammardatetime weekday
FlagsFunction

Returns the day of the week of a DateTime.

# Arguments

  • datetime — DateTime

Returns — string<preset::Weekday>

string libNtve_gf_GetWeekdayFromDateTime(
	datetime lp_datetime,
);

Category: DateTime

# Examples

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

    // Automatic Variable Declarations
    // Implementation
    return libNtve_gf_GetWeekdayFromDateTime(CurrentDateTimeGet());
}

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

    // Automatic Variable Declarations
    // Variable Initialization
    lv_weekday = libNtve_gf_GetWeekdayFromDateTime(lp_datetime);

    // Implementation

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");
    }
}