Rick Hurst Web Developer in Bristol, UK

Menu

Format Date in ZPT

Just a quick example of how to format a date in ZPT. DateTime is already available within the Plone environment, so you can do something like this:-

item_date item/EffectiveDate;
item_display_date python:DateTime(item_date).strftime(‘%B %d, %Y’);

The above example formats the date in a US style e.g. 3 July, 2006