Convert Date and Time to DateTime (Timestamp)

There are four fields - Date In , Time In, Date Out, Time Out
Date fields are Type = Date , Time fields are Type = Time

I need to convert “Date In” and “Time in” to a DateTimeIn (Timestamp)
I need to convert “Date Out” and “Time Out” to a DateTimeOut (Timestamp)
I need to calculate the duration of (DateTimeOut - DateTimeIn) and result in number of minutes


1 Like

First read this:

And then take a look at these:



Please see the expressions below and let me know what they should be, and also the expression for “Total Minutes”. I have reviewed the appsheet help but I am doing something wrong.

DateTime In
DateTime(Date([Date In])&" " &Time([Time In]))

DateTime Out
DateTime(Date([Date Out])&" " &Time([Time Out]))

DateTime In:

(DATETIME([Date In]) + ([Time In] - "00:00:00"))

DateTime Out:

(DATETIME([Date Out]) + ([Time Out] - "00:00:00"))

The the duration between them:

([DateTime Out] - [DateTime In])

Or skip DateTime In and DateTime Out altogether with:

  (DATETIME([Date Out]) + ([Time Out] - "00:00:00"))
  - (DATETIME([Date In]) + ([Time In] - "00:00:00"))

Better still, do away with Date In, Time In, Date Out, and Time Out and simply record DateTime In and DateTime Out directly.

See also:


That works. Thank you.

1 Like