Answers.Body: <p>You could do something like this in the template:</p>
  <p><code>{capture assign=notime}{domain.now}{/capture}{$notime|date_format:'%m/%d/%Y'}</code></p>
  <p>Also there is this in recent versions but it may be iffy how well it works depending on the exact civi version:</p>
  <p><code>{domain.now|crmDate:'shortdate'}</code></p>
  <p><a href="https://docs.civicrm.org/user/en/latest/common-workflows/tokens-and-mail-merge/#date" rel="nofollow noreferrer">https://docs.civicrm.org/user/en/latest/common-workflows/tokens-and-mail-merge/#date</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-19T19:35:25.060Z
Answers.Text: I tried {domain.now|crmDate:'shortdate'} but it did not resolve.It only showed {domain.now|crmDate:'shortdate'} in the email.
Answers.UserDisplayName: EricLB
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-19T19:48:18.787Z
Answers.Text: Ok good to know. It may also matter _where_ you're using it. That newfangled stuff might only work in workflow message templates, not user-driven message templates. Even for the `capture` solution, if using in user-driven templates it will need `define('CIVICRM_MAIL_SMARTY', 1);` in civicrm.settings.php to [enable smarty processing](https://docs.civicrm.org/user/en/latest/common-workflows/tokens-and-mail-merge/#smarty).
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-08-20T02:39:51.827Z
Answers.Text: I think the above needs double quotes not single
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-08-20T02:43:14.973Z
Answers.Text: and i think it should be Shortdate not shortdate and have put in a tweak to documentation for this
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-19T17:32:33.783Z
Answers.LastActivityDate: 2022-03-19T17:32:33.783Z
Answers.UserDisplayName: Demerit
Body: <p>How can I configure the token {domain.now} to use the short date format?  Currently it uses  the &quot;Complete Date and Time&quot; format.</p>
  <p>The site is running 5.45.3. on Drupal 9</p>
  
Tags: <tokens><date-preferences>
Title: Date format for token {domain.now}
ThreadText: # Date format for token {domain.now}
  
  (Asked by: username_0 on 2022-03-19)
  
  How can I configure the token {domain.now} to use the short date format? Currently it uses the "Complete Date and Time" format.
  
  The site is running 5.45.3. on Drupal 9
  
  **Tags:** tokens, date-preferences
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-03-19. Score: 2
  
  You could do something like this in the template:
  
  `{capture assign=notime}{domain.now}{/capture}{$notime|date_format:'%m/%d/%Y'}`
  
  Also there is this in recent versions but it may be iffy how well it works depending on the exact civi version:
  
  `{domain.now|crmDate:'shortdate'}`
  
  <https://docs.civicrm.org/user/en/latest/common-workflows/tokens-and-mail-merge/#date>
  
  > **Comments:**
  > **username_0**: I tried {domain.now|crmDate:'shortdate'} but it did not resolve.It only showed {domain.now|crmDate:'shortdate'} in the email.  
  > **username_1**: Ok good to know. It may also matter _where_ you're using it. That newfangled stuff might only work in workflow message templates, not user-driven message templates. Even for the `capture` solution, if using in user-driven templates it will need `define('CIVICRM_MAIL_SMARTY', 1);` in civicrm.settings.php to [enable smarty processing](https://docs.civicrm.org/user/en/latest/common-workflows/tokens-and-mail-merge/#smarty).  
  > **username_2**: I think the above needs double quotes not single  
  > **username_2**: and i think it should be Shortdate not shortdate and have put in a tweak to documentation for this  
  
  ---
  
  