Home > Net >  SQL datetime format conversion
SQL datetime format conversion

Time:11-29

I should somehow convert data type to easily insert into table with datetime format. From

2022-11-28T12:18:46.534919023Z

To 2022-11-28 12:18:46

BTW using PostgreSQL. Any ideas how to do it?

CodePudding user response:

There is no conversion necessary. The indicated value 2022-11-28T12:18:46.534919023Z can be directly inserted into a timestamp with time zone (timestamptz) column. See Result

More about CAST PostgreSQL CAST

  • Related