Scroll

Custom Function: Get the day of the week

Given a date value, this custom function returns the day of the week as a string. The day name is retrieved from the language file.

Arguments (Min - Max): 1 - 1

Usage

DayOfWeek(x)

  • x is a Date or DateTime value

Code

DateTime date = DateTime.Parse(args[0].ToString());
int day = (int)date.DayOfWeek;

return sessionInfo.PageInfo.LanguageDict.GetInfo("CalendarDayOfWeek" + day).Html;

Hidden Article Information

Article Author
Nicole
created 2016-08-18 21:12:18 UTC
updated 2017-06-20 13:49:53 UTC

Labels
functions, weekday, example, custom function, DayOfWeek,
Have more questions? Submit a request