tumblr tracker

GetWeekday

Library Reference ›› DateTime ››
Parent Previous Next

DateTime.GetWeekday


Namespace: DateTime


Returns the weekday value from a datetime variable.


retval = DateTime.GetWeekday(DateTime)


Parameters:

- DateTime; datetime variable or function call returning datetime variable; the datetime value to extract the day from


Returns:

The weekday value; 0 for Sunday, 1 for Monday, ... 6 for Saturday; numeric value.


Example


$val = DateTime.GetWeekday(DateTime.GetCurrentDateTime());


After execution the $val variable will contain the current weekday value (0 to 6).