Re: [NOVICE] Make year 01/01/0001 but leave timestamp alone

From: daq <daq(at)ugyvitelszolgaltato(dot)hu>
To: "Walker, Jed S" <Jed_Walker(at)cable(dot)comcast(dot)com>
Cc: Pgsql-sql(at)postgresql(dot)org
Subject: Re: [NOVICE] Make year 01/01/0001 but leave timestamp alone
Date: 2005-08-02 16:22:27
Message-ID: 16139676609.20050802182227@ugyvitelszolgaltato.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice pgsql-sql


WJS> I have a situation where we have a timestamp column but in special cases
WJS> we want to set the date to '01/01/0001' and leave the timestamp alone.
WJS> For example, '11/04/2005 10:30:05' would become '01/01/0001 10:30:05'.
WJS> I've been going through the various date time functions but don't see a
WJS> simple way to do this. Can someone help?

WJS> Thanks,

WJS> Jed

Maybe... Chomp the date part and concatenate the timestamp with
'01/01/0001'

DAQ

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message John DeSoi 2005-08-02 16:35:56 Re: Make year 01/01/0001 but leave timestamp alone
Previous Message Keith Worthington 2005-08-02 16:14:56 Re: Make year 01/01/0001 but leave timestamp alone

Browse pgsql-sql by date

  From Date Subject
Next Message John DeSoi 2005-08-02 16:35:56 Re: Make year 01/01/0001 but leave timestamp alone
Previous Message Keith Worthington 2005-08-02 16:14:56 Re: Make year 01/01/0001 but leave timestamp alone