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

  • 3 years ago

You can output what you like so:

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

Use https://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!