Professional Web Applications Themes

Setting up the date ahead of time - Dreamweaver AppDev

Hi all, I have a web site that surveys employees to see if they want to work the weekend. One of the problems I'm having is that I don't want to go into the database ahead of time and enter all the upcoming weekend dates. I was wondering if anyone knew how I could derive the upcoming weekend date based on the login time? i.e. I log in to survey today Tuesday, May 24, 2005 and based on that the webpage says I'm surveying for Saturday, May 28, 2005 and it would be that way every week based on the ...

  1. #1

    Default Setting up the date ahead of time

    Hi all,
    I have a web site that surveys employees to see if they want to work the
    weekend. One of the problems I'm having is that I don't want to go into the
    database ahead of time and enter all the upcoming weekend dates. I was
    wondering if anyone knew how I could derive the upcoming weekend date based on
    the login time? i.e. I log in to survey today Tuesday, May 24, 2005 and based
    on that the webpage says I'm surveying for Saturday, May 28, 2005 and it would
    be that way every week based on the day they were logging in. If it were
    Monday, it would know what the following Saturdays date was.

    Thanks in advance,

    Lenny


    Lenny@ford Guest

  2. #2

    Default Re: Setting up the date ahead of time

    It's messy, but it works.
    <%
    Weekend = Date()
    Do While Weekday(Weekend) <> 7
    Weekend = DateAdd("d",1,Weekend)
    Loop
    %>

    Now Weekend is the next Saturday.
    "Lennyford" <webforumsusermacromedia.com> wrote in message
    news:d6ves7$sdb$1forums.macromedia.com...
    > Hi all,
    > I have a web site that surveys employees to see if they want to work the
    > weekend. One of the problems I'm having is that I don't want to go into
    > the
    > database ahead of time and enter all the upcoming weekend dates. I was
    > wondering if anyone knew how I could derive the upcoming weekend date
    > based on
    > the login time? i.e. I log in to survey today Tuesday, May 24, 2005 and
    > based
    > on that the webpage says I'm surveying for Saturday, May 28, 2005 and it
    > would
    > be that way every week based on the day they were logging in. If it were
    > Monday, it would know what the following Saturdays date was.
    >
    > Thanks in advance,
    >
    > Lenny
    >
    >

    Lionstone Guest

  3. #3

    Default Re: Setting up the date ahead of time

    Works great Thanks
    Lenny@ford Guest

Similar Threads

  1. CFMX7.0.1 Administrator date time issue showing 13hrsbehind server time
    By bayfield in forum Coldfusion Server Administration
    Replies: 0
    Last Post: December 8th, 04:34 AM
  2. SQL generates 'access violation or syntax' error whencompiled into string var ahead of time
    By mate of the state in forum Coldfusion - Advanced Techniques
    Replies: 2
    Last Post: May 9th, 11:46 PM
  3. CFMX7 flash forms cfgrid time is two hours ahead in grid
    By none9898 in forum Macromedia ColdFusion
    Replies: 0
    Last Post: March 2nd, 07:17 AM
  4. Planning Your Movie Ahead of Time...(Devil's Advocate anyone?)
    By Jeff in forum Macromedia Director Basics
    Replies: 0
    Last Post: December 10th, 07:31 PM
  5. Replies: 3
    Last Post: October 21st, 07:13 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139