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)
Then,
I need to calculate the duration of (DateTimeOut - DateTimeIn) and result in number of minutes

Thanks.

0 5 744
5 REPLIES 5

First read this:

And then take a look at these:

3X_7_4_749d2f607c2903b054f4d9aafe07c601a45daecb.png

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.

Top Labels in this Space