Thread: Diff2Dates
View Single Post
  #5  
Old March 17th, 2010, 12:48 PM posted to microsoft.public.access
John Spencer
external usenet poster
 
Posts: 7,815
Default Diff2Dates

If you want to sort in order, use a second call to generate the sort order,
you don't have to display this value, but you can sort by it.

DateDiff("s",[FirstDate],[SecondDate])

That should return the number of seconds between the two dates so you can sort
by that and display the results of the Diff2Dates call.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

youkr wrote:
I have used the above function, however was wondering if there is a way I can
change what is returned?
At times I get records 1 day 10 hours 4 minutes, and other times 1 hour 8
minutes. When I try to place these returned records in ascendingdescending
order according to this field they do not return in order as there is not a
'0' before the '01' hours. Is there any way of doing this?

The more I play aroudn the more questions I have!!