Custom date format (instead of %date) for WebForm e-mail title? I have an webform with e-mails adresses that I want to send notifications to.

I want to make the title of the e-mail as e.g. "new message 2017-03-20".

I have tried with pattern suggested under another field (e-mail body):

new message %date


But it output the formatted date:

new message sunday, march 25, 2017 - 17:54


Is there a way to put here date in yyyy-mm-dd format without chaning the global date formatting on the website?

I also tried to add something like the pattern that is not listed under field:

new message [entity-fetched:field_event_date]


but it does not get replaced at all (I get message with that literal title):

new message [entity-fetched:field_event_date]
Place this code in a custom module:

     /* first add a custom date field (mydate), you have to set it's value with rules */
  /* change all capital letters with proper names (in lower case) */
  function YOURMODULE_preprocess_node(&amp;$vars) {
$vars['MYDATE'] = 
t('!datetime', 
  array('!datetime' =&gt; format_date($vars['node']-&gt;MYDATE, 
    'custom', 'M/d/Y, h:i a')));
}
  /* hide custom field to all users but admin */
function YOURMODULE_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  global $user;
  $uuid = $user-&gt;uid;
  /*  check that user is NOT admin (No1) */
    if ($uuid !='1') {
        /* if is user profile form use: if ($form_id == 'user_profile_form')*/
      if ($form_id == 'YOUR_FORM_ID') {
      //dsm($form);
        hide($form['field_MYDATE']);
       }
 }


for a diferent format look at: http://php.net/manual/es/function.date.php

having date format correct, go agian and do:

new message %mydate