in reply to unix time and dates with mysql

I could be wrong about this, but this sounds like something you can do without perl. If your columns are in date format you should be able to contruct a SQL statment that takes only those entries. Right? Or did I miss something?

select * where $date1 < dateCol and $date2 > dateCol

dateCol is the column that holds all your dates and $date1 and $date2 are the inputted dates. I believe that MySQL will hold the full date, including time.

UPDATE: I believe Cayenne is correct. From the MySQL documentaion: "The DATETIME type is used when you need values that contain both date and time information. MySQL retrieves and displays DATETIME values in 'YYYY-MM-DD HH:MM:SS' format."


I admit it, I am Paco.