List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:October 16 2008 10:03pm
Subject:Re: SUBTIME
View as plain text  
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:

> mysqlpp::SimpleResult res = query.execute();

No.  SimpleResult is for queries that return no value, like INSERT, 

I would use Query::store() for this:

	StoreQueryResult res =;
	if (res) {
		DateTime dt = res[0][0];
		// do something with dt....
SUBTIMEDemetris Zavorotnichenko16 Oct
  • Re: SUBTIMERick Gutleber16 Oct
  • Re: SUBTIMEWarren Young17 Oct