Link to home
Start Free TrialLog in
Avatar of skij
skijFlag for Canada

asked on

MySQL: Search Unix Timestamp Formatted Field Using "MM/DD/YYYY" Format

Using only MySQL, how can I make a selection based on dates in "MM/DD/YYYY" format working with a column that is formated as Unix Timestamp?

This query produces the results I desire:
SELECT * FROM `sales` WHERE `sale_time` > 1409529600 AND `sale_time` < 1414799999

Open in new window


HOwever, instead of providing the dates in a Unix Timestamp format, I want to provide them as: "09/01/2014" and "1409529600".

The first date should be calculated on the first second of that date and the second date should be calculated on the last second of that date.
ASKER CERTIFIED SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of skij

ASKER