PostgreSQL "to_timestamp" function in RDS Data Service command batchExecuteStatement
hi, I'm trying to use the postgresql "to_timestamp" function inside a RDS Data Service batchExecuteStatement calls of the AWS Javascript SDK.
I set the parameterSets to an array. An element of the array is:
{ name: 'received_on', typeHint: 'TIMESTAMP', value: { stringValue: 'to_timestamp(' + record.received_on + ')' } },
where record.received_on is an epoch time like 1644417054153 (I also tested 1644417054.153). The execution of the code throw this error: Cannot parse date or time "to_timestamp(164441704.153)"
Where is the problem? Thanks
Hi From PostgreSQL doc: https://www.postgresql.org/docs/10/functions-datetime.html
to_timestamp(double precision)
examples in the link indicating something like:
SELECT to_timestamp(982384720.12); Result: 2001-02-17 04:38:40.12+00
Your data to_timestamp(164441704.153) seems to have one more precision.
Relevant questions
PostgreSQL "to_timestamp" function in RDS Data Service command batchExecuteStatement
asked 3 months agoInvoke lamda async from Aurora PostgreSQL
Accepted Answerasked 2 years agoCan I use the RDS Postgresql S3 export query to replicate changes from RDS to S3?
Accepted Answerasked a year agoRDS/Postgres logs to S3
Accepted Answerasked 3 years agoUse PostgreSQL LIKE % wildcards with RDS Data API?
Accepted Answerasked 4 months agoRDS Postgresql migrate to Aurora Postgresql. Not showing "Aurora read replica" & "Migrate snapshot" options.
Accepted Answerasked 4 months agoChoosing RDS PostgreSQL over Aurora PostgreSQL
asked a month agoMigrate snapshot option disabled
asked a year agoHow to create SSL dblink connection from RDS to postgres on premise?
asked 4 months agoDoes AWS DMS support ARRAY data type for RDS for PostgreSQL on EC2 to Aurora PostgreSQL migration?
Accepted Answerasked 2 years ago