TIME values of null are converted to empty string which is invalid

I've read that it is normal for Retool to convert any null string values to the empty string when writing to the database.

But it is also doing this for a data value of type TIME.

It shows the conversion when I examine the component..

This is wrong, because empty string is not a valid value for data of type TIME and the database rejects it so the update or insert fails.

I have to work around this in the query by using...

value == ""? null : value;

But this shouldn't be necessary. null TIMEs should be left as null.

Hey there @davblo,

Yeah, I feel your pain and, as you rightly mentioned, there have been several requests in the past years to change this. Just linking them here for visibility :+1:

1 Like

Thanks, @MiguelOrtiz!

I don't have an eta, but I'll reach out here if we ship a fix/feature for this :slightly_smiling_face: