I am creating a page template, however when the `$date` variable is printed out it is always printed in `MMM dd, yyyy` format.
I would like the date to print out in `yyyy-MM-dd` format so that it can be sorted on (alphabetical sorting is only supported by the widget I am using)
Is there anyway to change the way the date is printed out short of changing the date format setting in General Configuration?
Hi Charlie,
I believe that the $date variable is using the date picker macro, which uses your locale when choosing the format:
Configuring the Time and Date Formats has no effect on this macro. We have a feature request (CONFSERVER-35168) requesting this ISO standard for sortability purposes.
Please vote on said feature request and comment there with your usage case as well.
Let me know if you have any questions about this.
Regards,
Shannon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.