I am wracking my brain to solve this. I have four times denoted as follows and need to calculate total time in seconds user was in the program.

Start Time (time process started)
End Time (time process ended)
Time 1 (time user logged in)
Time 2 (time user logged out)

Time1 Start Time Time2 End Time
2:41:55 PM 2:30:00 PM 2:51:04 PM 2:54:00 PM
9:28:08 AM 9:30:00 AM 9:57:56 AM 9:47:00 AM

DateDiff("s",(DMin([Time Fields].Time2, [Access Stat].[End Time])), (DMax([Time Fields].Time1, [Access Stat].[Start Time]))) AS Duration

I get a syntax error when this is run, in fact I get this even without the DateDiff running just the DMax portion. Help.