There has to be a better way to print a date like this, Oct 31, 2010 than this:
$Date.Format(M d), $Date.Format(Y)
If I use:
$Date.Format(M d, Y)
SS prints something like Oct 31. No year.
Any Ideas?
Chris.b
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
There has to be a better way to print a date like this, Oct 31, 2010 than this:
$Date.Format(M d), $Date.Format(Y)
$Date.Format(M d, Y)
Any Ideas?
Chris.b
Sadly this is a current limitation of the templating engine. commas indicate separate arguments and I'm pretty sure you cannot use quotes around the string or even escape it. Allowing $Date.Format("M, d, y") with quote marks would be a huge improvement to ssviewer.