Skip to main content
Participant
March 4, 2010
Question

Sort CFGrid on Date Field

  • March 4, 2010
  • 1 reply
  • 683 views

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

    This topic has been closed for replies.

    1 reply

    March 5, 2010

    Please read this

    http://livedocs.adobe.com/coldfusion/6/CFML_Reference/Tags-pt149.htm

    it wil help u

    OrlaSAuthor
    Participant
    March 5, 2010

    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.