I am not sure what your context is but you should be able to get the search time range in any context by using addinfo
(pipe this onto the end of your search) which will create these fields:
info_min_time=The earliest time boundary for the search.
info_max_time=The latest time boundary for the search.
info_sid=The ID of the search that generated the event.
info_search_time=The time when the search was run.
http://docs.splunk.com/Documentation/Splunk/6.2.5/SearchReference/addinfo