Date driven data display

Ask a Question related to ASP, Design and Development.

  1. #1

    Default Date driven data display

    My client has an annual calendar of events consisting of a record for each
    event, key field is the event date saved as a date type field. They would
    like the display to start with the current month, list to the end of the
    year then start the beginning of the year and list up to the current month.
    How does one retrieve data based on date? I guess I'd like something like :

    SELECT * FROM EVENTS WHERE [month is greater than or equal to the current
    month] ORDER BY Date

    Then :

    SELECT * FROM EVENTS WHERE [month is less than the current month] ORDER BY
    Date

    What is the syntax for the month bits between the []?

    Thanks!


    Simon Wigzell Guest

  2. Similar Questions and Discussions

    1. Data Driven Graphics
      I have found a few problems. I used the same apple script. It works fine but "illustrator" gives an error on reading an XML file with special...
    2. Data-driven graphics
      Hi, I'm Dan and i am trying to build catalogue and web pages from the same database. I'm wondering if the software filemakerpro would be programme to...
    3. Data-driven Graphics Wizard error
      I keep getting this error message when using the wizard to export one of my files: "An error occured. The command requires an active document." ...
    4. Data driven graphics and image masks - Help!
      Help! I'm working on a web project where I want to generate page headers from information pulled from an XML file. Everything generates properly...
    5. Display data from database in a scrollable data grid on an ASP Page
      Hi All, I want to display data from database in a scrollable data grid on an ASP Page. I want to use it for entering data also. Should i have to...
  3. #2

    Default Re: Date driven data display

    On Fri, 17 Oct 2003 00:14:17 GMT, "Simon Wigzell"
    <simonwigzell@shaw.ca> wrote:
    >My client has an annual calendar of events consisting of a record for each
    >event, key field is the event date saved as a date type field. They would
    >like the display to start with the current month, list to the end of the
    >year then start the beginning of the year and list up to the current month.
    >How does one retrieve data based on date? I guess I'd like something like :
    >
    >SELECT * FROM EVENTS WHERE [month is greater than or equal to the current
    >month] ORDER BY Date
    >
    >Then :
    >
    >SELECT * FROM EVENTS WHERE [month is less than the current month] ORDER BY
    >Date
    >
    >What is the syntax for the month bits between the []?
    >
    >Thanks!
    >
    Hints:
    The first day of the current month is:
    DateSerial(year(now), month(now), 1)

    The last day of the previous month one year from now is:
    DateSerial(year(now) + 1, month(now) , 0)

    SELECT * FROM EVENTS WHERE
    EventDate >= 'FirstOfCurrentMonth'
    AND
    EventDate <= 'LastOfPrevMonthPlus1Year'
    ORDER BY EventDate

    Another suggestion... Do not name a field "Date".

    Dan Brussee Guest

  4. #3

    Default Re: Date driven data display


    "Dan Brussee" <dbrussee@NOSPAMnc.rr.com> wrote in message
    news:kdluovck36fgfahb4su8pcmln5prvs77p2@4ax.com...
    > On Fri, 17 Oct 2003 00:14:17 GMT, "Simon Wigzell"
    > <simonwigzell@shaw.ca> wrote:
    >
    > >My client has an annual calendar of events consisting of a record for
    each
    > >event, key field is the event date saved as a date type field. They would
    > >like the display to start with the current month, list to the end of the
    > >year then start the beginning of the year and list up to the current
    month.
    > >How does one retrieve data based on date? I guess I'd like something like
    :
    > >
    > >SELECT * FROM EVENTS WHERE [month is greater than or equal to the current
    > >month] ORDER BY Date
    > >
    > >Then :
    > >
    > >SELECT * FROM EVENTS WHERE [month is less than the current month] ORDER
    BY
    > >Date
    > >
    > >What is the syntax for the month bits between the []?
    > >
    > >Thanks!
    > >
    >
    > Hints:
    > The first day of the current month is:
    > DateSerial(year(now), month(now), 1)
    >
    > The last day of the previous month one year from now is:
    > DateSerial(year(now) + 1, month(now) , 0)
    >
    > SELECT * FROM EVENTS WHERE
    > EventDate >= 'FirstOfCurrentMonth'
    > AND
    > EventDate <= 'LastOfPrevMonthPlus1Year'
    > ORDER BY EventDate
    >
    > Another suggestion... Do not name a field "Date".
    >
    Thanks, I'll try that, and "Date" was just for the example, thanks.


    Simon Wigzell 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