BUG | Disparity in duration and time formats with SPLIT()

 

Please consider the results below. It is necessary that the results are consistent. 

Here, it seems while all compatible AppSheet functions converts the Duration Epoch seconds to Hours, SPLIT() on the other hand converts them to Days.Hours notation. Of course both are correct in value, but there is inconsistency in format and this has an impact in expressions. 

 

 ExpressionReturn Value
1TODAY() - "02/1/2022"1272:00:00
2SPLIT(TODAY() - "02/1/2022", ":")53.00 , 00 , 00
3EXTRACTNUMBERS( TEXT(TODAY() - "02/1/2022") )1272 , 0 , 0
4SPLIT(1272:00:00, ":")1272 , 0 , 0
5SPLIT("1272:00:00", ":")53.00 , 00 , 00
6SPLIT( TEXT(TODAY() - "02/1/2022"), ":" )1272 , 0 , 0
7TEXT(TODAY() - "02/1/2022")
1272:00:00

 

Also, here, it seems that SPLIT() just doesn't know what to do with a Time value, and treats it as DateTime even if it is only Time

 

 ExpressionReturn Value
8TIMENOW()1:42:55
9EXTRACTNUMBERS( TEXT(TIMENOW()) )
1 , 42 , 55
10SPLIT( TIMENOW(), ":" )
INDEX( SPLIT(TIMENOW(), ":"), 1 )
INDEX( SPLIT(TIMENOW(), ":"), 3 )
12/30/1899 1 , 42 , 55 AM
12/30/1899 1
55 AM
11SPLIT(1:42:55, ":")1 , 42 , 55
12SPLIT("1:42:55", ":")12/30/1899 1 , 42 , 55 AM
13SPLIT( TEXT(1:42:55), ":" )1 , 42 , 55
0 3 96
3 REPLIES 3

Common Problems

The first argument to SPLIT() should be a textual value. If not provided a textual value, the non-textual value will be converted to Text before processing.



SPLIT() | AppSheet Help Center

I guess it's an expected behavior

Hmmm, I don’t get it. This does not explain the inconsistency observed. 

Actually, TEXT() gave the expected, consistent result in the third expression, and generally speaking, 1272 converted to text should give "1272", Not "53.00"

Update: I've added the tests number 4 through 13. A list of numbers where treated correctly and gave the expected results when passed to SPLIT(). It is clear now that SPLIT() has its particular way of dealing with a Duration, and deals erroneously with Time values. 

Top Labels in this Space