We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24094
    • 4 Posts
    Hi all,

    I have searched google for the solution but I can not find it sad

    I am trying to display like a little calendar, formated thru css. In order to do this, I need to access the Date from ditto in 3 different ways:

    I need the month in short form (ie. Mar, Feb, etc)

    I need the year (last two didgets ie 09 10, etc)

    and I need the Day of Month.

    Now is this possible to do with ditto?

    Sorry if this is a stupid question but I am fairly new. If you would like to see what it is supposed to look like:

    http://fde-modx.secure.homelinux.net/index.php?id=2

    TIA
    Patrick
      • 16278
      • 928 Posts
      You can do this using PHx (built in with Ditto) in your template chunk, rather than &dateSource, &dateFormat and [+date+].

      Just use placeholders like this for month, year and day in your template chunk, using createdon or another date field in your resources:
      [+createdon:date=`%b`+] [+createdon:date=`%y`+] [+createdon:date=`%d`+] 
      smiley KP
        • 24094
        • 4 Posts
        Thanx, works like a charm smiley