Using WHERE statement to display date range

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Using WHERE statement to display date range

    I have a multi-year events database that is displayed on the web. But
    I also would like to display events from that database one week at a
    time. Does anyone know how to do that? Thanks in advance.

    If you have any questions, please ask.

    Dan Matthews, MCP
    Technology Manager
    Green Hall, University of Kansas
    (785) 864-9267
    [email]dmatthews@ku.edu[/email]
    [url]http://www.people.ku.edu/~dmatthew/[/url]
    Dan Matthews Guest

  2. Similar Questions and Discussions

    1. Date Range Validation
      Hello; CL_FRST (08/10/2004) and CL_LST (05/24/2005) holds the beginning and ending date of school calendar which is also prepopulated for every...
    2. Date Range
      I?ve got a routine that figure out 30 days from today?s date, but what I want to do is resolve a start date and an end date where the start date is...
    3. Date Range Search
      I have a calendar search from where an option is to search between dates and riight now it never finds anything. Do I need to do a format...
    4. date range query
      Hi I just need to pull up a query which will bring up orders between a specified date range say jan 2003/ july 2002 and from this I have to pull up...
  3. #2

    Default Re: Using WHERE statement to display date range

    "Dan Matthews" <dmatthews@ku.edu> wrote in message
    news:eed3ba41.0308010809.2121cff9@posting.google.c om...
    > I have a multi-year events database that is displayed on the web. But
    > I also would like to display events from that database one week at a
    > time. Does anyone know how to do that? Thanks in advance.
    >
    > If you have any questions, please ask.
    >
    > Dan Matthews, MCP
    > Technology Manager
    > Green Hall, University of Kansas
    > (785) 864-9267
    > [email]dmatthews@ku.edu[/email]
    > [url]http://www.people.ku.edu/~dmatthew/[/url]
    Database? Version? Table Structure?


    Chris Hohmann Guest

  4. #3

    Default Re: Using WHERE statement to display date range

    In Access, the date is delimited by #. In SQL Server, just enclose the date
    in 's.

    WHERE myDate=#8/1/2003#

    WHERE myDate='8/1/2003'

    --
    Manohar Kamath
    Editor, .netBooks
    [url]www.dotnetbooks.com[/url]


    "Dan Matthews" <dmatthews@ku.edu> wrote in message
    news:eed3ba41.0308010809.2121cff9@posting.google.c om...
    > I have a multi-year events database that is displayed on the web. But
    > I also would like to display events from that database one week at a
    > time. Does anyone know how to do that? Thanks in advance.
    >
    > If you have any questions, please ask.
    >
    > Dan Matthews, MCP
    > Technology Manager
    > Green Hall, University of Kansas
    > (785) 864-9267
    > [email]dmatthews@ku.edu[/email]
    > [url]http://www.people.ku.edu/~dmatthew/[/url]

    Manohar Kamath [MVP] Guest

  5. #4

    Default Re: Using WHERE statement to display date range

    Thanks for the responses!

    I was looking for a syntax clarification and I eventually came up with:

    ....WHERE (Events.StartDate >= Date() AND Events.StartDate <= Date() + 7) ORDER BY...

    and that worked. Again, thanks for the responses!

    If you have any questions, please ask.

    Dan Matthews, MCP
    Technology Manager
    Green Hall, University of Kansas
    (785) 864-9267
    [email]dmatthews@ku.edu[/email]
    [url]http://www.people.ku.edu/~dmatthew/[/url]

    "Manohar Kamath [MVP]" <mkamath@TAKETHISOUTkamath.com> wrote in message news:<eJJfFoLWDHA.388@TK2MSFTNGP10.phx.gbl>...
    > In Access, the date is delimited by #. In SQL Server, just enclose the date
    > in 's.
    >
    > WHERE myDate=#8/1/2003#
    >
    > WHERE myDate='8/1/2003'
    >
    > --
    > Manohar Kamath
    > Editor, .netBooks
    > [url]www.dotnetbooks.com[/url]
    >
    >
    > "Dan Matthews" <dmatthews@ku.edu> wrote in message
    > news:eed3ba41.0308010809.2121cff9@posting.google.c om...
    > > I have a multi-year events database that is displayed on the web. But
    > > I also would like to display events from that database one week at a
    > > time. Does anyone know how to do that? Thanks in advance.
    > >
    > > If you have any questions, please ask.
    > >
    > > Dan Matthews, MCP
    > > Technology Manager
    > > Green Hall, University of Kansas
    > > (785) 864-9267
    > > [email]dmatthews@ku.edu[/email]
    > > [url]http://www.people.ku.edu/~dmatthew/[/url]
    Dan Matthews Guest

Posting Permissions

  • You may not post new threads
  • You may 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