SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jun 2011
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking Need ASP Help !!

    Hi,
    I am almost zero in asp programing,
    I am looking for a code which will display a time specific records on ASP page.
    data base will be like
    NAME Number Time

    It should take next four hours records from file calculating current system time.
    Like if its 2.30pm on system (user system or server anything) it should show records from 2.30pm to 6.30pm. in a table.

    I am using IIS7 on Win 7 32bit, and site will be hosted locally, not on any web server.
    Please HELP !!!
    Last edited by Hitesh123; Jun 19, 2011 at 13:05. Reason: added some info.

  2. #2
    SitePoint Member
    Join Date
    Apr 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to query the database with something like this:

    SELECT *
    FROM TableName
    WHERE TimeColumnName BETWEEN #"& NOW() &"# AND #"& DATEADD("h",4,NOW()) &"#
    ORDER BY TimeColumnName

    That is assuming you are using an Access database, if you are using MSSQL you will need to use ' rather than # around the times.

    Hope that helps,

    Dan


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
  •