in reply to unix time and dates with mysql

Use Time::Local to convert the datetime to seconds from the Epoch. You can than just use your typical numeric comparisons to find out if you fall in a predetermined range. Time::Local is a standard module. However, MySQL will allow you to compare dates directly, if properly formatted, so I'm not sure that we're on the same page.

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

  • Comment on (Ovid) Re: unix time and dates with mysql