cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Ordering by date on a timestamp field
Date Thu, 09 Jun 2016 06:36:21 GMT
Unfortunately you can't do that with ObjectSelect. SQLSelect of course would allow to use MySQL
functions. So that's probably the way to go here.

Andrus

> On Jun 8, 2016, at 11:07 PM, Frank Herrmann <frank.herrmann@modernizingmedicine.com>
wrote:
> 
> Hello all,
> 
> Is there a way in Cayenne, when adding an ordering to a query, to order by
> only the date portion of a timestamp (including time) field? Basically, the
> timestamp includes hour, minutes, seconds, etc. I only want to sort on the
> date portion (month, day, year), or any other such criteria.
> 
> The reason for this is, if we include other fields to sort by, we would
> want the second sort field to group on the date, not the full timestamp.
> 
> Thanks,
> 
> -Frank
> 
> -- 
> FRANK HERRMANN
> SOFTWARE ENGINEER
> 
> T: 561-880-2998 x1563
> 
> E: frank.herrmann@modmed.com
> 
> 
> 
> [image: [ Modernizing Medicine ]] <http://www.modmed.com/>
> [image: [ Facebook ]] <http://www.facebook.com/modernizingmedicine> [image:
> [ LinkedIn ]] <http://www.linkedin.com/company/modernizing-medicine/> [image:
> [ YouTube ]] <http://www.youtube.com/user/modernizingmedicine> [image: [
> Twitter ]] <https://twitter.com/modmed_EMA> [image: [ Blog ]]
> <http://www.modmed.com/BlogBeyondEMR> [image: [ Instagram ]]
> <http://instagram.com/modernizing_medicine>


Mime
View raw message