Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-03-07 11:28:30

Ji31
Member
Registered: 2005-08-24
Posts: 103

Own date format?

I use TXP 4.0.3 and I want to use different date format forone column of my site. So I have used this:

<txp:posted format="%M" /> (it should write month in this format: Jan – Dec) but I get “46” WHY????

I want this format: February 14, 2006

(Edit: updated to display your code correctly. :) -Mary)

Last edited by Mary (2006-03-07 11:54:18)

Offline

#2 2006-03-07 11:56:33

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Own date format?

Here are the format strings available to you. %M displays minutes, not the month. What you want is something like: <txp:posted format="%B %d, %Y" />

Offline

#3 2006-03-07 12:02:54

Ji31
Member
Registered: 2005-08-24
Posts: 103

Re: Own date format?

Mary wrote:

Here are the format strings available to you. %M displays minutes, not the month. What you want is something like: <txp:posted format="%B %d, %Y" />

Aaaaha, I thought that this function is Date() (and there is M month), but it’s the strftime().
Ok, Thanx a lot.

Offline

Board footer

Powered by FluxBB