I have a reservation program that lets somebody enter a reservation for a specific date. The bookingdate variable is just the moment they make the reservation, but the event date requires them to enter month - day - time from 3 select menus. So I set it up like this.
bookingdate - datetime (because i want the calendar date and the time)
event date - unix timestamp (i convert to timestamp using the three values)
That all works fine, but now i'm adding some reporting and i when i wanted to display reservations by date there are two options: by booking date and by event date
So when they are on the reporting page and they search for the specific dates, they are again entering a start date and end date to search for by selecting the month-day-time. When they search by event date, I just convert to timestamp and compare it to the value in the database and that works fine.
I only run into a problem on the bookingdate because it's in the datetime format. Is there some way to convert the month-day-time values into datetime, so i can search or is it better to store the booking date as timestamp too?
In general, what are the best situations to use all the different date formats?