How to find Date and Time difference in controller?

Hi,

I need a method similar to “distance_of_time_in_words_to_now” to be used
in the controller.

“distance_of_time_in_words_to_now” methods work only in view.

Thanks,
Ratnavel.