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

Example 2 :

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 "fryday" 
    CASE 6 
      PRINT "saturday" 
    CASE 7 
      PRINT "sunday" 
  END SELECT 

END


Referenced by :