We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10997
    • 27 Posts
    So, here’s my Ditto call...
    [!Ditto? &parents=`4` &extenders=`summary` &tpl=`AnnounceSummaryHome` &dateSource=`createdon` &dateFormat=`%A %B %e, %Y`!]


    What I get is... nothing, at least for the date, the rest works fine. Without the &dateFormat parameter I get the correct info in the default format... obviously I am doing something wrong. I’ve tried about a million different ways. I see where I could likely work around this with PHx, but I am attempting to stay away from PHx if I can.

    Any Suggestions for a newbie - who is LOVING this CMS/CMF, btw?

    Thanks
    Ben


      • 7231
      • 4,205 Posts
      Are you using the [+date+] placeholder? This is the placeholder that will output from the dateSource and dateFormat parameters. The option is to use PHx to format the [+createdon+].
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don't know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 10997
        • 27 Posts
        Yes, sure am using the [+date+] placeholder.. just simply that, no other formatting or anything else yet... since it doesn’t seem to work at all. Wonder what I could be missing?
          • 16278
          • 928 Posts
          This may be related to the platform you’re on - your format string doesn’t work for me on my Windows PC using %e or %D, so I looked in the PHP manual, and found this for strftime():
          Not all conversion specifiers may be supported by your C library, in which case they will not be supported by PHP’s strftime(). Additionally, not all platforms support negative timestamps, therefore your date range may be limited to no earlier than the Unix epoch. This means that e.g. %e, %T, %R and %D (there might be more) and dates prior to Jan 1, 1970 will not work on Windows, some Linux distributions, and a few other operating systems. For Windows systems a complete overview of supported conversion specifiers can be found at this MSDN website.
          embarrassed
          KP