@Sinethemba_Gayiza
I believe this is the 3rd or the 4th time you are asking the same question, so let me try to explain once more:
For Datetime type columns, the initial value is always NOW() and just for this moment it’s calculated as 5/9/2019 12:37:23 am
For Time type columns, the initial value is always TIMENOW() and just for this moment it’s calculated as 12/30/1899 12:37:23am. For Time type columns, a date of 12/30/1899 is automatically appended (which is called Joda Date) because in Unix systems there is no time value, there is only datetime value and it’s concatenation of date & time basically. And this is by-default and by-design like this.
For Date type columns, the initial value is always TODAY() and just for this moment it’s calculated as 5/9/2019 12:00:00 am. For Date type columns, a time of 12:00:00am is automatically appended (which is called Joda Time) because in Unix systems there is no date value, there is only datetime value and it’s concatenation of date & time basically. And this is by-default and by-design like this.
For Duration type columns, there is no initial value expression like above, because it’s a calculation column of 2 date, time or datetime values.
In general; for Time In and Time Out or Clock In and Clock Out, it will be essential if the column types are set as Datetime BOTH in the gSheet and the app’s column structure, as the calculation will be more specific and clear. Because, you cannot now to which specific date that entered time value belongs to.
Let’s have a sheet like this and let’s do some basic Math:
Option#1
Basics: Concatenate [Date] & [Time] columns and find the duration between this concatenation and [DateTime] column.
DATETIME(CONCATENATE([Date]," ",[Time])) - [DateTime]
OR
DATETIME([Date]&" "&[Time]) - [DateTime]
Here is how AppSheet interprets this expression and makes the calculation. The result is 24:00:00 or 1.00:00:00. Notice how the [Date] and [Time] column values are evaluated.
Option#2
Basics: Find the difference between [Datetime] and [Date] columns as duration
[Date] - DATE([DateTime])
Here is how AppSheet interprets this expression and makes the calculation. The result is 24:00:00 or 1.00:00:00. Notice how the [Date] and [Time] column values are evaluated.
Option#3
Basics: Find the difference between [Time] and [Datetime] columns as duration
[Time] - TIME([DateTime])
Here is how AppSheet interprets this expression and makes the calculation. The result is 00:00:00 or 0.00:00:00. Notice how the [Date] and [Time] column values are evaluated.
Hope it’s clear now