-
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.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks