[rt-users] How to change the display of Date Time Custom field in Email

j.hubbard jason.hubbard at circles.com
Wed Feb 12 13:54:17 EST 2014

Hi, I have searched around for a while now and cannot find an answer so far.

I have a DateTime Custom field called "Effective".  The value of this field
is sent out in emails on ticket creation.  

So far I have changed settings in RT_SiteConfig for $DateTimeFormat and
$DateDayBeforeMonth but those don't affect the output in emails at all.

The output I see looks like 'yyyy-mm-dd hr:min:sec'.  I want it in
'mm-dd-yyy hr:min:sec'.

Below is my template followed by an example email I receive.  Any help on
how to get the template to change the way the date is sent in email would be
very much appreciated.  Everything else in the template is working as

Thank you

--begin template--

Content-Type: text/html
To: example at example.com
Subject: {my $s=($Transaction->Subject||$Ticket->Subject||""); $s =~
s/\[Comment\]\s*//g; $s =~ s/^Re:\s*//i; $s;} Alert -
RT-Attach-Message: yes


*New Termination Notification.*<br>
{$Transaction->Content() eq 'This transaction appears to have no content' ?
'' :

*Employee:*      {$Ticket->FirstCustomFieldValue('Employee');}<br>

*Effective:*       {$Ticket->FirstCustomFieldValue('Effective');}<br>

Type:*       {$Ticket->FirstCustomFieldValue('Term

*Role:*              {$Ticket->FirstCustomFieldValue('Role');}<br>

*Role Detail:*   {$Ticket->FirstCustomFieldValue('Role

*Site:*                {$Ticket->FirstCustomFieldValue('Site');}<br>

*Requestors:*    {$Ticket->RequestorAddresses}<br>





--end template--

--begin email example--

New Termination Notification.

testing 123 
Employee:       Joe Somebody
Effective:        2014-02-19 15:35:00
Term Type:      Type 1
Role:              Other
Role Detail:     Test
Site:               New Mexico
Requestors:    someone at example.com
Ticket:            http://test-rt.company.local/Ticket/Display.html?id=9733

--end email example--

View this message in context: http://requesttracker.8502.n7.nabble.com/How-to-change-the-display-of-Date-Time-Custom-field-in-Email-tp56622.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.

More information about the rt-users mailing list