in reply to dbi and dates

MySQL (and other major databases, I suspect) have functions (such as UNIX_TIMESTAMP() in MySQL) which can return the time in Unix time format (for valid such times). Doing that, you can do something like "SELECT UNIX_TIMESTAMP(dt) FROM db;" to get the timestamp.... Some also include a form of DATATIME() function that you can specify the format, which may also help.

YMMV, but hope that helps lead you in the right direction....