Re: builtin func to extract date from datetime field
Robert Großkopf <[email protected]> Fri, 04 Mar 2011 15:26:47 +0100
| Newsgroups | gmane.comp.openoffice.dba.user |
|---|---|
| Message-ID | <[email protected]> |
Hello Norbert, > > I have to set up a query in OO-base like this one. In "mysql dialect" it > would be > > SELECT DATE(`datetime-field`) AS `workdate`, SUM(`field-2`), > SUM(`field-3`), .... FROM `Another-Query` > WHERE .... > GROUP BY `workdate` > ORDER BY `workdate` DESC In hsqldb there is no function called DATE. http://hsqldb.org/doc/guide/ch09.html You can try DAYOFMONTH(`datetime-field`)||'.'||MONTH(`datetime-field`)||'.'||YEAR(`datetime-field`) AS `workdate` for a german dateformat like 4.3.2011. Robert -- ----------------------------------------------------------------- To unsubscribe send email to [email protected] For additional commands send email to [email protected] with Subject: help