However, this method wouldn't allow me to sort the NiceDate column. It would just appear unsortable. Only direct database fields are sortable, and NiceDate is just the returned value of a getter. Even if I were to write a nicer version of the date to a database field and sort that, it would be sorted alphanumerically rather than chronologically.
What I was getting at was the possibility of having a field that is altered for display purposes, but remains a sortable date field under the bonnet. Is this possible?
12 July 2010 at 1:41am
On TableListField (and all classes derived from it) you can influence the way fielddata are displayed in the list by using the setFieldFormatting() method. It receives an array('field name' => 'formatting string'). This will leave the way the field is sorted intact, based on the underlying (db)field value (at least that's what I found).
More info here http://doc.silverstripe.org/tablelistfield. You can use the $NiceDate from the post above in the formatting string (instead of $value).
If you're referring to ModelAdmin: that's far more complex, although it could be done (without the dirty hack, that is :-) )