Results 1 to 5 of 5

Thread: Day of the Week

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Posts
    29
    Is there an "easy" way to consistantly determine the day of te week (Mon, Tue, Wed). There wouldn't happen to be a variable out there that carries it, like Date and Time do?

    Thanks in advance
    When life gives you lemons, spit in the bowl and pass it to the next guy!

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    WeekDay Function returns the weekday number 1-7 of any date variable/String expression that is a valid date.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Thumbs up

    Will this help you?

    Code:
    Select Case Weekday("10/01/2001")
    Case vbSunday
        MsgBox "Is Sunday"
    Case vbMonday
        MsgBox "Is Monday"
    Case vbTuesday
        MsgBox "Is Tuesday"
    Case vbWednesday
        MsgBox "Is Wednesday"
    Case vbThursday
        MsgBox "Is Thursday"
    Case vbFriday
        MsgBox "Is Friday"
    Case vbSaturday
        MsgBox "Is Saturday"
    End Select

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Posts
    29
    Thanks, I was JUST gonna post that I found it in MSDN Library. Thank you for the speedy responce though.
    When life gives you lemons, spit in the bowl and pass it to the next guy!

  5. #5
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Thumbs up

    Hi! Planewalker99, This will more better and efficient

    Code:
    WeekdayName(Weekday("10/01/2001", vbUseSystemDayOfWeek))
    Cheers!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width