Code:
DateTime lastLogon=row.lookup_by_name("LogonTime");
query<<"SELECT * FROM Posts WHERE CreationTime>%0q";
query.parse();

//Template query is set, and it works just fine (in this case):
result=query.store(SQLString("2005-03-03 12:00:00"));
But that's not what i want, I don't want to pass date & time as a string, I wanna pass it as DateTime object lastLogon but don't know how to convert it... tried something like this:

Code:
result=query.store(SQLString(lastLogon)); //this doesn't work