Invalid input syntax for type timestamp

I have created a table in retool database and it contains two Date+Time fields with PostgreSQL type of TIMESTAMP. I added a form component onto main and used the Generate form function to create a form. The fields in question where configured as time components. I fill the form an when I submit the form I get this error " invalid input syntax for type timestamp"

Hi @Yiannis_Kapodistrias

Thanks for the feedback! :thinking: I haven't been able to reproduce this yet. I know you mentioned it's a timestamp, but would mind sharing the full config for the column on the db side:

The good news is that you can replace the time input with a date time component to the form & you won't need to do anything to the insert query, as it just references the full form:

I have seen something similar with null values, which can require a bit more manual configuration

I'm having a similar problem but my varient is when exporting and importing csvs from retool db.

I recently got access to a staging environment, so I'm trying to take my production data and export it into staging. I know this is backwards, but it's a consequence of upgrading my retool plan.

Repro steps:
Create a table with column of type timestamp.
Insert a record.
Export the csv
Import the same csv into the table

image

Hi @bithippie

Thanks for reaching out! We have a bug where this error can happen with any records that have an empty cell or null value - even if you've set up your column to be nullable :disappointed: Any chance that's what you're running into?

Just noting that the bug mentioned above has been fixed :slightly_smiling_face:

Hi @Tess,

I have the same issue. I try to import data from CSV to Retool DB, but this error raise : invalid input syntax for type timestamp: "".
Some values are null (or empty) in my CSV, and I'm trying to import them into columns that can be null. Are you sure the bug is fixed?

Thanks

Hmm I just tested it & it's working for me. Are you using Retool v3.35 (Retool Cloud)? Do you have a sample csv you can share?

Hi, here is a sample that reproduce the issue :

retool-bug-example.csv (32 Bytes)

And yes I'm using Retool cloud v3.35
image