Results 1 to 1 of 1

Thread: MySQL query needed for date range

  1. #1
    Member
    Join Date
    Jul 2009
    Posts
    269
    Thanks
    50
    Thanked 68 Times in 31 Posts
    Rep Power
    196
    Reputation
    418

    Default MySQL query needed for date range

    Ive got a MySQL database containing a record of user sessions from a Wireless Hotspot system, the main columns im interested in is the username, total_data_transferred, and start_time.

    The start_time column is using the DATETIME data type and is in the format:
    2011-11-05 1832

    I need to search by username and date range where username is = to specific value and the date range is a custom range, could someone tell me which SQL command to use? Many thanks.

    Edit: Got the information I need now, dont worry.

    I used:
    SELECT * FROM `table` WHERE month( start_time ) between 11 and 11
    Last edited by gareth41; 05-11-11 at 07:00 PM.



Look Here ->

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
  •