Received: from symcom.com ([209.11.41.82]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g09G1nB17973 for ; Wed, 9 Jan 2002 11:01:49 -0500 (EST) (envelope-from pgsql@symcom.com) Message-Id: <200201091601.g09G1nB17973@postgresql.org> Received: from WorldClient [209.11.41.82] by symcom.com [209.11.41.82] with SMTP (MDaemon.v3.5.0.R) for ; Wed, 09 Jan 2002 11:17:07 -0500 Date: Wed, 09 Jan 2002 11:17:07 -0500 From: "postgresql" To: "PgSQL-SQL" Subject: problem with date and to_char X-Mailer: WorldClient Pro 2.2.1 X-MDRemoteIP: 209.11.41.82 X-Return-Path: pgsql@symcom.com X-MDaemon-Deliver-To: pgsql-sql@postgresql.org X-Archive-Number: 200201/64 X-Sequence-Number: 6155 I am a little stumped. postgresql 7.1.3 suse linux 7 I have a database with CREATE TABLE "fc_communication" ( "acode" character varying(12), "conversation" text, "contactdate" date CREATE TABLE "comm_date" ( "lastcontact" timestamp with time zone DEFAULT 'now' NOT NULL, Constraint "comm_date_pkey" Primary Key ("lastcontact") When I update fc_communication I also (without a trigger) update comm_date with a sep update comm_date set lastcontact = 'now'; it works beautifully if I do a psql 'select * from comm_date;' 2002-01-08 16:16:03 I always get the last moment that someone updated the communications file however what I want to do is: SELECT to_char(lastcontact, 'Month DD, YYYY HH:MM') from comm_date; January 08, 2002 04:01 why is this 04:01? Every time I do this I get the very first date (that no longer exists). Why do I get different results. I expect 'select *' is the base and everything else is a varient. Ted tedpet@symcom.com