--- /opt/rt3/lib/RT/Report/Tickets.pm	2009-11-18 10:49:45.000000000 +0100
+++ /opt/rt3/local/lib/RT/Report/Tickets.pm	2010-02-26 13:26:13.000000000 +0100
@@ -69,12 +69,13 @@
     }
 
     push @fields, map {$_, $_} qw(
+        DaysCreatedToResolved
     );
 
     my $queues = $args{'Queues'};
@@ -229,6 +233,9 @@
             $self->{"_sql_report_watcher_users_alias_$type"} = $u_alias;
         }
         @args{qw(ALIAS FIELD)} = ($u_alias, $column);
+    } elsif ( $field =~ /DaysCreatedToResolved/ ) {
+        my $alias = $args{'ALIAS'} || 'main';
+        $args{'FUNCTION'} = "IF(DATEDIFF($alias.Resolved, $alias.Created) = 0, '< 1', IF($alias.Resolved > $alias.Created, DATEDIFF($alias.Resolved, $alias.Created), NULL))";
     }
     return %args;
 }
