cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Boyle <>
Subject Re: Ordering by date on a timestamp field
Date Wed, 08 Jun 2016 20:42:04 GMT
I can't speak to what Cayenne is able to do solely when using an ObjectQuery, but from a database
perspective it sounds like you want to be using a view that provides the date-only version
of your datetime column. Then you could query it just like a table and do your sort on the
date-only column. You can probably use the Query object type in your project model to achieve
this if you aren't keen on adding SQL objects to your model outside of Cayenne Modeler.


From: Frank Herrmann <>
Sent: Wednesday, June 8, 2016 4:07:44 PM
Subject: Ordering by date on a timestamp field

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.




T: 561-880-2998 x1563


[image: [ Modernizing Medicine ]] <>
[image: [ Facebook ]] <> [image:
[ LinkedIn ]] <> [image:
[ YouTube ]] <> [image: [
Twitter ]] <> [image: [ Blog ]]
<> [image: [ Instagram ]]

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message