Hmm, so the 30 in the example data is the myTotMySql_min column value?
Does that mean date and time are stored in separate columns?
That might give some problems when going past midnight, wouldn’t it?
SELECT myDateMySql
, myTimeMySql + INTERVAL myTotMySql_min
MINUTE AS newtime
FROM daTable
SELECT myDateMySql
, TIME_FORMAT(myTimeMySql,'%H:%i') + INTERVAL myTotMySql_min MINUTE
AS newtime
FROM daTable
Output:
myDateMySql newtime
2010-01-01 (Null)
And this code:
SELECT
DATE_ADD(myDateMySql, INTERVAL
myTimeMySql MINUTE) AS newtime FROM daTable
SELECT
DATE_ADD(myDateMySql, INTERVAL
TIME_FORMAT(myTimeMySql,'%H:%i') MINUTE) AS newtime
FROM daTable