We launched new forums in March 2019—
join us there
.
In a hurry for help with your website?
Get Help Now!
Back to MODX.com
Forums
Docs
Revo Issues
Blog
My Forums
Add-ons
Creating & Repurposing Content
Ditto
Search
wrong date format with Ditto (displays unix-like format instead of dd-mm-yy)
23 Posts
pdkga065
Reply #1,
16 years, 6 months ago
For example, th date displays as: 1268283825. I tried putting &dateFormat=`%B %e, %Y` in the snippet call, but it still displays the date the same way. Anyone have a solution to this?
87 Posts
legio_noctis
Reply #2,
16 years, 6 months ago
Use the PHx date modifier as explained at
http://wiki.modxcms.com/index.php/PHx#date.28.3D.60dateformat.60.29
In your case the call will be something like [+date:date=’%B %e, %Y’+] (replace apostrophes with backticks: can’t find them on iPod).
2,310 Posts
bunk58
Reply #3,
16 years, 6 months ago
Have you also defined the date source e.g.
&dateSource=`pub_date`
or another available unixtime field/TV ?
970 Posts
tkfm
Reply #4,
16 years, 6 months ago
Quote from: pdkga065 at Mar 11, 2010, 05:33 PM
For example, the date displays as: 1268283825.
Use [+date+] in the Ditto template.