# WeekDay

Result = WeekDay ( Date/Time )

Returns the week day of a date/time value. See Predefined constants for a list of constants associated with week days.

Example

    PRINT Now; " -> "; WeekDay(Now)

    05/16/2002 22:31:30 -> 4

    PUBLIC SUB Form_Open()

      PRINT Now

      PRINT WeekDay(Now)

      SELECT CASE WeekDay(Now)
        CASE 1
          PRINT "Monday"
        CASE 2
          PRINT "Tuesday"
        CASE 3
          PRINT "Wednesday"
        CASE 4
          PRINT "Thursday"
        CASE 5
          PRINT "Friday"
        CASE 6
          PRINT "Saturday"
        CASE 7
          PRINT "Sunday"
      END SELECT

    END

See also

Now, Time, Date, Day, Month, Year, Hour, Minute, Second

Previous: WAIT Next: WEND