We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Question, Problem, Blog

Seperating day and month from postDateTime

Hello,

Is it possible to seperate the day and month from postDateTime? I would like to output my postDateTime like this: https://imgur.com/zIgtpA3.

Mike

Mike Hendriks

Mike Hendriks 0 points

  • 1 year ago

You can output what you like so:

// Outputs Day Only
<perch:content id="date" type="date" format="d" />

Use http://php.net/manual/en/function.date.php for reference

How easy.

I created the following:

<span><perch:blog id="postDateTime" type="date" format="d" /></span><span><perch:blog id="postDateTime" type="date" format="M" /><br><perch:blog id="postDateTime" type="date" format="Y" /></span>

Thank you!