Pratik Borkar
Pratik Borkar

Reputation: 475

DateTime Conversion in PostgreSQL

How can I convert 'dd-MM-yyyy HH:mm:ss.fff' to 'yyyy-MM-dd HH:MI:SS.MS' format so that I can store timestamp values in a PostgreSQL 8.0.2 timestamp column?

Upvotes: 0

Views: 952

Answers (1)

Daniel Vérité
Daniel Vérité

Reputation: 61526

Presumably you don't have to convert the format, just switch to european datestyle before issuing COPY.

The command is:

SET datestyle to 'DMY';

Upvotes: 1

Related Questions