Professional Web Applications Themes

Retrieve records by date? - Dreamweaver AppDev

ASP/Access/VBscript How can I retrieve records from a table where the date field matches today's date using Where date = todays date. I use now() to automatically store the date in records in my database. It is stored like this: 27.03.2005 21:00:00 Please help?? Bjorn....

  1. #1

    Default Retrieve records by date?

    ASP/Access/VBscript

    How can I retrieve records from a table where the date field matches
    today's date using
    Where date = todays date.
    I use now() to automatically store the date in records in my database. It is
    stored like this: 27.03.2005 21:00:00

    Please help??

    Bjorn.


    btn Guest

  2. #2

    Default Re: Retrieve records by date?

    On Tue 05 Jul 2005 03:17:20p, btn wrote in
    macromedia.dreamweaver.appdev: 

    'date' is a keyword, so it's best not to name a field in your database
    date. What you want:

    SELECT * FROM myDatabase WHERE myDate = Date()
    Joe Guest

  3. #3

    Default Re: Retrieve records by date?

    Hi and thanx for reply.

    Date() works if I only store date 06.07.2005 in my database.
    In this case I also store the time and date, like this; 06.07.2005 02:10:00

    If I use SELECT * FROM myDatabase WHERE myDate = Date()
    nothing is displayed. How can I also get the time?

    Bjorn.




    btn Guest

  4. #4

    Default Re: Retrieve records by date?

    WHERE myDate BETWEEN Date() AND DATEADD("d",1,Date())
    If a record happens to be submitted at exactly midnight the next day, it
    will still show, unfortunately. But that's only 1 second (or possibly 33ms
    or so depending on the date/time field's precision) that would have an
    unexpected result. :)

    "btn" <com> wrote in message
    news:daf7ka$45$macromedia.com... 


    Lionstone Guest

Similar Threads

  1. Two Function Calls to a Database to Retrieve the UniqueID of Inserted Records
    By rycbn in forum Coldfusion - Advanced Techniques
    Replies: 11
    Last Post: July 14th, 08:22 AM
  2. Retrieve n records from database
    By Sean Berry in forum Macromedia Flash
    Replies: 1
    Last Post: January 18th, 03:11 AM
  3. How to retrieve the records if I have .SQL script file using ADO.net
    By Kiran in forum ASP.NET Data Grid Control
    Replies: 4
    Last Post: October 14th, 08:38 PM
  4. Need to retrieve records
    By MLangner-MMTS in forum Macromedia Dreamweaver
    Replies: 2
    Last Post: July 12th, 11:14 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