different timestamp format

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
Posts: 4
Joined: Thu 10 Mar 2011 08:28

different timestamp format

Post by lgm42 » Thu 10 Mar 2011 08:40

I'm using dotConnect to read / write a postreSQL database and I would like to write a dateTime into a timestamp without time zone slot.

Before using dotConnect we made it in C++ directly with ODBC and recordset.

The old method written a date like that : 2009-12-09 08:11:06
and dotConnect write a date like that : 2011-03-10 09:05:58.311378

I would like dotConnect to write the date with the old format. How I can do that ?

Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Fri 11 Mar 2011 12:57

dotConnect for PostgreSQL inserts DateTime values with the greatest precision allowed by the database (and provided by the System.DateTime structure). The simplest way to limit this precision is to set length for the table column, i.e., define its (column's) type to be 'timestamp(0) without time zone'. Otherwise, you can modify DateTimes being inserted.

Please tell us if this helps.

Post Reply