In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> I have two columns in my Bookings table of type DATETIME -
> Booking_Start_Date and Boking_End_Date. How can i update every row so that
> all of the times for Booking_Start_Date are 09.00 and all of the times for
> Booking_End_Date are 17.30, without affecting any of the dates?
> Thanks for your help
Off the top of my head - use mysql's DATE_FORMAT to build a date string,
then concatenate the required time string and use that as the update
value. Something like
UPDATE table SET Booking_Start_date =
CONCAT(DATE_FORMAT(Booking_Start_Date, your format here),'09.00'),
Booking_End_date = CONCAT(DATE_FORMAT(Booking_End_Date, your format
You'll need to play a bit with that - and of course test on a backup.
Quod subigo farinam
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
Q: What is the most annoying thing on usenet?
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php