Forums

Model.field (Text) as date

hellykun 06 Feb, 2015
Hello,

Is it possible to set a text field which is "01-02-2014".
to appear as date in chronoconnectivity?

I would like to do this because of sorting purposes.

Thanks a lot in advance.
GreyHead 06 Feb, 2015
Hi Hellykun,

You can use the PHP box in CC to convert the date into a sortable version e.g. '2015-02-01'

The better solution would be to save the date in the database table as a DATE() so that MySQL can sort it - you could then use the PHP box in the listing to format it for display as '01-02-2014'

Bob
This topic is locked and no more replies can be posted.