Answers.Body: <p>In order to get smarty to work in email templates you need to enable it editing the settings file <code>civicrm.settings.php</code>, as per CiviCRM <a href="http://wiki.civicrm.org/confluence/display/CRMDOC/Smarty+in+mail+templates" rel="noreferrer">documentation</a>:</p>
  
  <pre><code>if (!defined('CIVICRM_MAIL_SMARTY')) {
       define( 'CIVICRM_MAIL_SMARTY', 1 ); // default is: define( 'CIVICRM_MAIL_SMARTY', 0 );
  }
  </code></pre>
  
  <p>With smarty enabled, the following snippet should output the desired date format:</p>
  
  <pre><code>{$smarty.now|date_format} // Output: Jan 12, 2016
  {$smarty.now|date_format:"%B %e, %Y"} // Output: January 12, 2016
  </code></pre>
  
  <p>As Eli says and references Coleman post is a very good example, simply pasting his code into an existing extension, or creating one for your needs, will work.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-12T17:41:31.123Z
Answers.LastActivityDate: 2016-01-12T17:41:31.123Z
Answers.UserDisplayName: Andrei
Answers.Body: <p>You could create a custom token and add the format you want. An example of such a token in a custom format (a long with lots of other tokens) you could find in the extension no.maf.tokens This extension contains specific tokens for a client and one of the tokens in the date of today in Norwegian.</p>
  
  <p>See <a href="https://github.com/CiviCooP/org.civicoop.no.maf.ext/blob/master/org.civicoop.no.maf.tokens/maf_tokens.php#L72" rel="nofollow">https://github.com/CiviCooP/org.civicoop.no.maf.ext/blob/master/org.civicoop.no.maf.tokens/maf_tokens.php#L72</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-12T21:00:45.917Z
Answers.LastActivityDate: 2016-01-12T21:00:45.917Z
Answers.UserDisplayName: Jaap Jansma - CiviCooP
Answers.Body: <p>This is posted as a comment in the top answer, but it deserves more visibility as an answer: You can install <a href="https://github.com/eileenmcnaughton/nz.co.fuzion.civitoken" rel="nofollow noreferrer">Fuzion's Civitoken extension</a>. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-25T14:53:13.403Z
Answers.LastActivityDate: 2019-03-25T14:53:13.403Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.Body: <p>I think this would be a custom token to get it in the format that you're looking for, but it wouldn't be too difficult and I am pretty sure you'll be able to find one someone has already written -</p>
  
  <p>Check out the bottom two links of this page:</p>
  
  <p><a href="https://forum.civicrm.org/index.php?topic=13757.0" rel="nofollow noreferrer">https://forum.civicrm.org/index.php?topic=13757.0</a></p>
  
  <p>The last post April 29: "We discovered at the sprint that just about everyone has written a token for this at some point"...</p>
  
  <p>I think there was a good example on coleman's blog here, too, but the main content doesn't seem to be loading for me anymore:</p>
  
  <p><a href="https://civicrm.org/blog/colemanw/create-your-own-tokens-for-fun-and-profit" rel="nofollow noreferrer">https://civicrm.org/blog/colemanw/create-your-own-tokens-for-fun-and-profit</a> (corrected link)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-12T23:28:46.093Z
Answers.Text: Thanks I used this token which worked perfectly https://github.com/eileenmcnaughton/nz.co.fuzion.civitoken
Answers.UserDisplayName: Yossi
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-12T15:48:49.483Z
Answers.LastActivityDate: 2017-11-28T01:49:43.080Z
Answers.LastEditDate: 2017-11-28T01:49:43.080Z
Answers.UserDisplayName: Eli Lisseck
Body: <p>How can I automatically display today's date in a pdf or email. 
  I tried the "thank you date" token but the date format is 12-31-15 12:30. I need December 31, 2015...
  I tried plugging in this 
  {$smarty.now|date_format}
  Still didn't work. 
  Any ideas?</p>
  
  <p>Thanks</p>
  
Tags: <tokens>
Title: Today's-Date token for PDF
ThreadText: # Today's-Date token for PDF
  
  (Asked by: username_0 on 2016-01-12)
  
  How can I automatically display today's date in a pdf or email.
  I tried the "thank you date" token but the date format is 12-31-15 12:30. I need December 31, 2015...
  I tried plugging in this
  {$smarty.now|date\_format}
  Still didn't work.
  Any ideas?
  
  Thanks
  
  **Tags:** tokens
  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_4 on 2016-01-12. Score: 5 | Accepted answer
  
  I think this would be a custom token to get it in the format that you're looking for, but it wouldn't be too difficult and I am pretty sure you'll be able to find one someone has already written -
  
  Check out the bottom two links of this page:
  
  <https://forum.civicrm.org/index.php?topic=13757.0>
  
  The last post April 29: "We discovered at the sprint that just about everyone has written a token for this at some point"...
  
  I think there was a good example on coleman's blog here, too, but the main content doesn't seem to be loading for me anymore:
  
  <https://civicrm.org/blog/colemanw/create-your-own-tokens-for-fun-and-profit> (corrected link)
  
  > **Comments:**
  > **username_0**: Thanks I used this token which worked perfectly https://github.com/eileenmcnaughton/nz.co.fuzion.civitoken  
  
  ---
  
  ### Answer by username_1 on 2016-01-12. Score: 6
  
  In order to get smarty to work in email templates you need to enable it editing the settings file civicrm.settings.php, as per CiviCRM documentation:
  if (!defined('CIVICRM_MAIL_SMARTY')) {
       define( 'CIVICRM_MAIL_SMARTY', 1 ); // default is: define( 'CIVICRM_MAIL_SMARTY', 0 );
  }
  
  With smarty enabled, the following snippet should output the desired date format:
  {$smarty.now|date_format} // Output: Jan 12, 2016
  {$smarty.now|date_format:"%B %e, %Y"} // Output: January 12, 2016
  
  As Eli says and references Coleman post is a very good example, simply pasting his code into an existing extension, or creating one for your needs, will work.
  
  
  ---
  
  ### Answer by username_2 on 2016-01-12. Score: 4
  
  You could create a custom token and add the format you want. An example of such a token in a custom format (a long with lots of other tokens) you could find in the extension no.maf.tokens This extension contains specific tokens for a client and one of the tokens in the date of today in Norwegian.
  
  See <https://github.com/CiviCooP/org.civicoop.no.maf.ext/blob/master/org.civicoop.no.maf.tokens/maf_tokens.php#L72>
  
  
  ---
  
  ### Answer by username_3 on 2019-03-25. Score: 2
  
  This is posted as a comment in the top answer, but it deserves more visibility as an answer: You can install [Fuzion's Civitoken extension](https://github.com/eileenmcnaughton/nz.co.fuzion.civitoken).
  
  
  ---
  
  