Announcement

Collapse
No announcement yet.

Script help - isWeekend

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Script help - isWeekend

    Can someone provide a quick example of the use of the isWeekend function? Specifically, where can I get the current date to use as an argument to this function?

    Thanks!

    --------
    Denny

    #2
    As an example if you wanted to check if today is a weekend you could do the following:

    Code:
     Dim WeekendRightNow As Boolean = hs.IsWeekend(Now)
    Nicolai L

    Comment


      #3
      Thanks! The "Now" is not obvious at all from the documentation.

      Comment


        #4
        Originally posted by carletondm View Post
        Thanks! The "Now" is not obvious at all from the documentation.
        Agreed. It was looking at the error in Visual Studio that made me realise the parameter was needed.

        You can obviously throw any date in as a parameter to evaluate if a given date is a weekend day or not.
        Nicolai L

        Comment

        Working...
        X