From: Warren Young Date: October 16 2008 10:03pm Subject: Re: SUBTIME List-Archive: http://lists.mysql.com/plusplus/8052 Message-Id: <48F7BA41.30202@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Demetris Zavorotnichenko wrote: > SELECT SUBTIME('2007-12-31 23:59:59.999999','1 1:1:1.000002') > > > > So how would I get a result from this query ? The MySQL manual says SUBTIME returns a value in the same form as the first parameter, which looks like DATETIME: http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_subtime > mysqlpp::SimpleResult res = query.execute(); No. SimpleResult is for queries that return no value, like INSERT, CHANGE, DROP, ALTER.... I would use Query::store() for this: StoreQueryResult res = query.store(); if (res) { DateTime dt = res[0][0]; // do something with dt.... }