<p dir="ltr">RT automatically stores dates and times into tickets when they are created, opened and closed.</p>
<p dir="ltr">I notice that you want a relative value (e.g. "40 minutes ago"), which means that that value is only meaningful for a very short time, so perhaps you're wanting to place it in an outgoing email or something.</p>

<p dir="ltr">Can you tell us more about how you want to use this?  I suspect so far that a custom field isn't necessary.</p>
<div class="gmail_quote">On 31/07/2014 1:29 am, "AJ" <<a href="mailto:aaron.mccarthy@southwestern.ie">aaron.mccarthy@southwestern.ie</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I have made a "datetime" CustomField. Whenever a ticket is changed from open<br>
to resolve the date and time will be inserted into the custom field.<br>
<br>
However I want it to display the time elapsed e.g. 40 minutes ago etc.<br>
<br>
This is the code I am using in location<br>
/html/Callbacks/MyRT/Elements/RT__Ticket/ColumnMap<br>
<br>
<%init><br>
$COLUMN_MAP->{DifferenceReopenedTime} =  {<br>
        title     => 'Reopened', # loc<br>
        attribute => 'Reopened',<br>
        value     => sub {<br>
           my $CFValue = $Ticket->FirstCustomFieldValue('13')<br>
           my $now = RT::Date->new($RT::SystemUser);<br>
           $now->SetToNow();<br>
<br>
<br>
           return $CFValue->AgeAsString();<br>
        }<br>
};<br>
</%init><br>
<%args><br>
$COLUMN_MAP<br>
</%args><br>
<br>
Can anyone help<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://requesttracker.8502.n7.nabble.com/Add-Time-difference-in-search-result-tp58100.html" target="_blank">http://requesttracker.8502.n7.nabble.com/Add-Time-difference-in-search-result-tp58100.html</a><br>

Sent from the Request Tracker - User mailing list archive at Nabble.com.<br>
--<br>
RT Training - Boston, September 9-10<br>
<a href="http://bestpractical.com/training" target="_blank">http://bestpractical.com/training</a><br>
</blockquote></div>