Right(Time field) =ndard Time

In a form view I have a formula that takes the right 11 of a time field and the result in my form in “ndard Time)”. The expression assistant says it should be 5:00:00 AM which is right. Is this just because of the form view? It’s right when its displayed in a table view.

Solved Solved
0 6 121
1 ACCEPTED SOLUTION

No, actually; there is no long format for Time values (only Ignore seconds, which is a shorter format). I am perplexed! I feel like I recall RIGHT() and LEFT() exhibiting odd behavior when passed non-Text input. Try forcing [OpenHours] to Text with:

right(([OpenHours] & ""), 11)

or:

right(concatenate([OpenHours]), 11)

Whatever the case, this definitely looks like a bug.

View solution in original post

6 REPLIES 6

Steve
Platinum 4
Platinum 4

That’s weird!

What does RIGHT(Time field, 100) produce?

Also, why are you using RIGHT() on a Time value?

Is it a Time value? Or a DateTime value?

3X_f_e_fe7b365221499f4ec2c42057b0c1453b6aa1d560.png
#notmyformula this is a coworker’s app that I am assisting on the development while hes busy with something else.
(He doesn’t clean up his forms to not show virtual columns that don’t need to be there )

Obviously, there’s some inconsistency between the Expression Assistant and the app itself. There are a number of such inconsistencies. You just have to work around them. You could also report this as a bug to support@appsheet.com.

Is the column Time or DateTime?

What is the stored value? Is the stored value text (e.g., a plain text spreadsheet cell, or a CHAR or VARCHAR database column), or a temporal type?

it’s a text column based on the value of a time column, so I assume that the default conversion for a time to text field is a long time format of some sort?
3X_f_6_f6c7e879222d0ce199923dd4cb7832a41a3cf970.png

No, actually; there is no long format for Time values (only Ignore seconds, which is a shorter format). I am perplexed! I feel like I recall RIGHT() and LEFT() exhibiting odd behavior when passed non-Text input. Try forcing [OpenHours] to Text with:

right(([OpenHours] & ""), 11)

or:

right(concatenate([OpenHours]), 11)

Whatever the case, this definitely looks like a bug.

It only appears in the form which is odd. Its a virtual column formula so really shouldn’t need to be shown in there in the first place.

Top Labels in this Space