Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1viZnB-00ADjb-08 for pgsql-admin@arkaria.postgresql.org; Wed, 21 Jan 2026 15:06:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1viZn9-007gQD-32 for pgsql-admin@arkaria.postgresql.org; Wed, 21 Jan 2026 15:06:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1viZn9-007gQ4-1t for pgsql-admin@lists.postgresql.org; Wed, 21 Jan 2026 15:06:43 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1viZn7-001btg-0y for pgsql-admin@lists.postgresql.org; Wed, 21 Jan 2026 15:06:43 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 60LF6ZFv2193944; Wed, 21 Jan 2026 10:06:35 -0500 From: Tom Lane To: Erik Wienhold cc: SASIKUMAR Devaraj , pgsql-admin@lists.postgresql.org Subject: Re: Sybase to postgres Timestamp column In-reply-to: References: <1903154046.1708912.1769003607609.ref@mail.yahoo.com> <1903154046.1708912.1769003607609@mail.yahoo.com> Comments: In-reply-to Erik Wienhold message dated "Wed, 21 Jan 2026 15:25:59 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2193942.1769007995.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 21 Jan 2026 10:06:35 -0500 Message-ID: <2193943.1769007995@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Erik Wienhold writes: > On 2026-01-21 14:53 +0100, SASIKUMAR Devaraj wrote: >> When we are migrating from sybase to postgres, we are facing issues >> with Timestamp field format and not matching. >> Sybase format: Jan 21 2026 5:35 PM > I'm not familiar with Sybase. What issues are you facing? > But Postgres should accept this timestamp format without issue: Yeah, I don't see a difficulty on the input side, so I'm guessing the OP is wishing Postgres would output timestamps in that format. Sorry, none of the built-in datestyle settings quite match that. It's easy to replicate pretty closely using to_char(): postgres=3D# select to_char('Jan 21 2026 5:35 PM'::timestamp, 'Mon DD YYYY= HH:MI PM'); to_char = ---------------------- Jan 21 2026 05:35 PM (1 row) But wrapping all your timestamp output columns in to_char() might be more trouble than fixing the client-side code to accept ISO format. regards, tom lane