Skip to main content

When I try to add data to a timestamptz field in postgres using the postgres writer it gives the following error:

Value of attribute 'start_date' could not be converted to type 'timestamptz'. Feature will be logged and skipped
WARN Â |+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
WARN Â |Feature Type: `admin.real_right_version'
WARN Â |Attribute(string) Â : `start_date' has value `2018-11-13 09:43:58.3875761+01'

I'm using FME 2018.1 and postgressql 10.5

Try converting the "start_date" value into the Standard FME Date/Time Format before writing.


Try converting the "start_date" value into the Standard FME Date/Time Format before writing.

Thank you, @takashi @DateTimeNow(utc) did the trick


@DateTimeNow() should give exactly the same result as the timestamper - both produce output in Standard FME Date/Time format - you shouldn't need to format either before writing to postgres
@DateTimeNow() should give exactly the same result as the timestamper - both produce output in Standard FME Date/Time format - you shouldn't need to format either before writing to postgres

But this doesn't work for me. Only the DateTimeStamper did the trick. Maybe it has something to do with the UTC offset


But this doesn't work for me. Only the DateTimeStamper did the trick. Maybe it has something to do with the UTC offset

@DateTimeNow(utc) if you need UTC time


@DateTimeNow() should give exactly the same result as the timestamper - both produce output in Standard FME Date/Time format - you shouldn't need to format either before writing to postgres

@DateTimeNow(utc) did the trick


@DateTimeNow(utc) did the trick

I have the same issue here now. I don't really get how you solved it. I have an attribute with date and time from a gml file and i want to insert this in an postgis database with attribuite type timestamptz.

 


I have the same issue here now. I don't really get how you solved it. I have an attribute with date and time from a gml file and i want to insert this in an postgis database with attribuite type timestamptz.

 

If you are using the PostGIS writer to write the features into the database table, you will have to format the datetime value with the Standard FME Date/Time format.

See here to learn more: Standard FME Date/Time Format


Reply