Here's a table with just a TIMESTAMP column:
CREATE TABLE `ts` (
`ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8
# Here are some values in that table:
mysql> select ts, MONTH(ts) from ts;
+---------------------+-----------+
| ts | MONTH(ts) |
+---------------------+-----------+
| 2009-03-19 19:00:26 | 3 |
| 2009-03-19 19:00:26 | 3 |
| 2009-03-19 19:00:26 | 3 |
| 2009-03-24 22:45:01 | 3 |
| 2009-03-27 19:32:29 | 3 |
| 2009-03-27 20:32:29 | 3 |
| 2009-03-27 18:32:29 | 3 |
| 2010-02-07 10:02:32 | 2 |
| 2009-08-07 10:03:02 | 8 |
+---------------------+-----------+
# by comparison, here is the current month:
mysql> select MONTH(now());
+--------------+
| MONTH(now()) |
+--------------+
| 2 |
+--------------+
# Sounds like you want something like:
select * from table where MONTH(datefield) = MONTH(NOW());
This is ambiguous and/or contradictory; please rephrase:
"able to do things at certain time, ie. every 6 hours starting at midnignt"
To see if it is currently between midnight and 6am (inclusive), you could do:
WHERE CURTIME() BETWEEN '00:00' and '06:00'
Everything you need is here (granted, it is a lot to digest):
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html