rekha,
mysql> select date_format(dateEntered, "%m-%d-%Y %H:%I") as dateEntered,
-> date_format(date_add(dateEntered, interval 2 hour), "%m-%d-%Y %H:%I")
as '2 Hours Later'
-> from newsStories where storyID = 1122;
+--+--+
| dateEntered | 2 Hours Later
"Rekha Das" <[EMAIL PROTECTED]> wrote:
> What time function should I use to add 2 hours to a time value I am
getting
> from the database ?
Convert the time to seconds, add 7200 seconds (2 hours), then convert back
to time format.
SELECT SEC_TO_TIME(TIME_TO_SEC(my_time_field) +7200);
--
Steve We