Answers.Body: <p>This is specific to civicase activities and it's because the view form uses its own way of displaying custom fields that's different from regular activities. I posted this quickie patch in the lab ticket but it's not the best long-term solution:</p>
  <pre><code>diff --git a/templates/CRM/Case/Form/ActivityView.tpl b/templates/CRM/Case/Form/ActivityView.tpl
  index 9bc3c3d781..868c69c512 100644
  --- a/templates/CRM/Case/Form/ActivityView.tpl
  +++ b/templates/CRM/Case/Form/ActivityView.tpl
  @@ -54,7 +54,11 @@
               {foreach from=$customGroup item=customField name=fields}
                 &lt;tr{if ! $smarty.foreach.fields.last} style=&quot;border-bottom: 1px solid #F6F6F6;&quot;{/if}&gt;
                   &lt;td class=&quot;label&quot;&gt;{$customField.label}&lt;/td&gt;
  +                {if $customField.type == 'Date'}
  +                &lt;td&gt;{$customField.value|crmDate}&lt;/td&gt;
  +                {else}
                   &lt;td&gt;{$customField.value}&lt;/td&gt;
  +                {/if}
                 &lt;/tr&gt;
               {/foreach}
             {/foreach}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-06-18T18:34:53.697Z
Answers.LastActivityDate: 2021-06-18T18:34:53.697Z
Answers.UserDisplayName: Demerit
Body: <p>I've added a date and time field to an activity ('departure date'). The problem is that it steadfastly refuses to display as anything other than YYYY-MM-DD HH-MM-SS even though the custom field is specified as d MM yy with a 12 hour time format. This is when I hit 'View' against an activity in a list of case activities and get a pop up. Which does look odd when the activity date is displayed correctly as (e.g.) 14 June, 2021 1:03pm. My 'date preferences' were all set to default (I'm in the UK) but to try and fix this this I've set the 2 activity dates formats to d MM yy, and the custome the same.  But to no avail.  Civi is at 5.37.2 - I guess a bug?
  Problem raised as <a href="https://lab.civicrm.org/dev/core/-/issues/2655" rel="nofollow noreferrer">this issue</a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-06-14T20:26:08.200Z
Comments.Text: display 'where'?
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-06-14T20:26:57.623Z
Comments.Text: only asking as there is an outstanding issue of time/date not displaying in specified format in eg receipts
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-06-14T20:31:06.837Z
Comments.Text: Edited the question & added 'This is when I hit 'View' against an activity in a list of case activities & get a pop up'
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-06-14T20:38:05.130Z
Comments.Text: I can see the same problem on other activity types too where there is a custom date field. The activity date shows up as d MM y but the custom date is dd/mm/yyy (where there is no time field)
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-06-15T00:45:25.867Z
Comments.Text: is it the same outcome if you right click and open as new tab? (just to confirm it isn't pop-up only behaviour?)
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-06-15T07:16:29.083Z
Comments.Text: It's the same problem in a new tab
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-06-15T15:02:46.463Z
Comments.Text: I see the same thing just haven't noticed since my date setting actually is yyyy-mm-dd. I'd post a lab ticket.
Comments.UserDisplayName: Demerit
Tags: <civicase><activity><date-preferences>
Title: Activity - custom date format display incorrect
ThreadText: # Activity - custom date format display incorrect
  
  (Asked by: username_0 on 2021-06-14)
  
  I've added a date and time field to an activity ('departure date'). The problem is that it steadfastly refuses to display as anything other than YYYY-MM-DD HH-MM-SS even though the custom field is specified as d MM yy with a 12 hour time format. This is when I hit 'View' against an activity in a list of case activities and get a pop up. Which does look odd when the activity date is displayed correctly as (e.g.) 14 June, 2021 1:03pm. My 'date preferences' were all set to default (I'm in the UK) but to try and fix this this I've set the 2 activity dates formats to d MM yy, and the custome the same. But to no avail. Civi is at 5.37.2 - I guess a bug?
  Problem raised as [this issue](https://lab.civicrm.org/dev/core/-/issues/2655)
  
  **Tags:** civicase, activity, date-preferences
  
  > **Comments:**
  > **username_1**: display 'where'?  
  > **username_1**: only asking as there is an outstanding issue of time/date not displaying in specified format in eg receipts  
  > **username_0**: Edited the question & added 'This is when I hit 'View' against an activity in a list of case activities & get a pop up'  
  > **username_0**: I can see the same problem on other activity types too where there is a custom date field. The activity date shows up as d MM y but the custom date is dd/mm/yyy (where there is no time field)  
  > **username_1**: is it the same outcome if you right click and open as new tab? (just to confirm it isn't pop-up only behaviour?)  
  > **username_0**: It's the same problem in a new tab  
  > **username_2**: I see the same thing just haven't noticed since my date setting actually is yyyy-mm-dd. I'd post a lab ticket.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2021-06-18. Score: 1
  
  This is specific to civicase activities and it's because the view form uses its own way of displaying custom fields that's different from regular activities. I posted this quickie patch in the lab ticket but it's not the best long-term solution:
  
  ```
  diff --git a/templates/CRM/Case/Form/ActivityView.tpl b/templates/CRM/Case/Form/ActivityView.tpl
  index 9bc3c3d781..868c69c512 100644
  --- a/templates/CRM/Case/Form/ActivityView.tpl
  +++ b/templates/CRM/Case/Form/ActivityView.tpl
  @@ -54,7 +54,11 @@
               {foreach from=$customGroup item=customField name=fields}
                 <tr{if ! $smarty.foreach.fields.last} style="border-bottom: 1px solid #F6F6F6;"{/if}>
                   <td class="label">{$customField.label}</td>
  +                {if $customField.type == 'Date'}
  +                <td>{$customField.value|crmDate}</td>
  +                {else}
                   <td>{$customField.value}</td>
  +                {/if}
                 </tr>
               {/foreach}
             {/foreach}
  
  ```
  
  
  ---
  
  