Results 1 to 3 of 3

Thread: date set to Tuesday

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    9

    date set to Tuesday

    I'm trying to create a simple if else statement that when it is Tuesday I want to run piece of code 'A' and when it's not Tuesday I want it to run code 'B'. If I have a global variable = to 3 (the VB day for Tuesday - i think!?) how can I incorporate that into an expression stating if today's date = 3 (or Tuesday) then run A else B? I'm just not sure how to set that up correctly and how to make it so that the code realizes that the global variable set to 3 means Tuesday. Make sense? Any help is greatly appreciated. Thanks!!

    -sly

  2. #2
    Lively Member johnrswanton's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    84

    Re: date set to Tuesday

    <%
    TodaysDate=date()

    if WeekdayName(weekday(TodaysDate))="Tuesday" then

    response.write("today is: Tuesday <br>")
    else

    response.write("today is not: Tuesday <br>")
    end if

    %>

    hope this code is of some help to u
    ***********
    "why do things that are suspose to bad for us taste so good, whats ur addiction"
    Kanye West
    **********

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    9

    Re: date set to Tuesday

    Great, Thank You!!

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