SQL to Code: How to write it.
Posted on 2006-06-12
I have a form in which are input two dates which I would like to display in a text box by using the AfterUpdate Event of the second date field. The SQL for the query that subtracts the two dates is:
SELECT CInt(([EndDateTime]-[StartDateTime])*1440) Mod 60 AS Minutes, CInt(([EndDateTime]-[StartDateTime])*24) Mod 24 AS Hours, Format([Hours],"0") & " hours, " & Format([Minutes],"0") & " minutes" AS Elapsed
How would I write that in code format?