Copy link to clipboard
Copied
Hi,
Does anyone know if its possible to sort a CFGrid on a date field (as opposed to the Grid seeing the date as a string).
I know the docs say that adding sort=yes to the grid does a simple text sort but surely there is a way to sort on a date also?
Any help much appreciated.
Thanks,
Orla
Copy link to clipboard
Copied
Please read this
http://livedocs.adobe.com/coldfusion/6/CFML_Reference/Tags-pt149.htm
it wil help u
Copy link to clipboard
Copied
I think my issue was I was using the DateFormat function on the date before it was used in the datagrid. I'm guessing this function returns a string or something instead of a date object as removing this allowed date sorting.