A proper MS Access query should look like:
SELECT DateDiff ("d", t1.FirstDateTimeField, t1.SecondDateTimeField)
FROM table1 AS t1
See:
DateDiff Function[
^]
MS Access: DateDiff Function[
^]
You can achieve the same by using vb.net
DateFiff function[
^], but i do not recommend to use it. Rather than it, use
TimeSpan[
^]:
Dim departure As DateTime = #06/12/2010 6:32PM#
Dim arrival As DateTime = #06/13/2010 10:47PM#
Dim travelTime As TimeSpan = arrival - departure
Console.WriteLine("{0} - {1} = {2}", arrival, departure, travelTime)