View Single Post
  #2  
Old 11-04-2013, 06:49 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: PHP Code in template to use date function?

Yes, but you want to use smarty code in your template.

http://www.smarty.net/docsv2/en/language.modifier.date.format.tpl

Examples:
Code:
<p>{$smarty.now|date_format:$config.Appearance.date_format}</p> <p>{$smarty.now|date_format:"%A"}</p> <p>{$smarty.now|date_format:"%B"}</p> <p>{$smarty.now|date_format:"%Y"}</p>
Output:
11-04-2013

Monday

November

2013
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote