Order pages by date (Not created by or modified date)
We give all our news items/pages a date field through the Page Properties dialog. This xtype is datefield. So I can configure it to be MM-DD-YYYY or DD-MM-YYYY, etc. My question is how can I use the JCR SQL query language to order my query by this date field. I'm using
ORDER BY datePosted DESC
Currently the date is stored as MM-DD-YYYY. It reads only the month value and orders it by that. How cna I make it read the whole date value?