pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Joel Fradkin <jfradkin@wazagua.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: I am writing a MS SQL server conversion utility and am having an issue with timestamp
Date: Sat, 15 Jan 2005 18:50:36 -0700
Message-ID: <20050116015036.GA34820@winnie.fuhr.org> (raw)
In-Reply-To: <003c01c4fa7e$1d463460$797ba8c0@jfradkin>
References: <003c01c4fa7e$1d463460$797ba8c0@jfradkin>

On Fri, Jan 14, 2005 at 04:15:02PM -0500, Joel Fradkin wrote:

> Any one have a good idea for dealing with a timestamp where only time is
> available on some of the source records?

TIMESTAMP values contain a date and time.  If you have only times
then they'll have to go in a TIME column or you'll have to use a
bogus date in a TIMESTAMP column (ugly).

> Some records have both time and day.
>
> My MSSQL database has 290 tables so splitting the fields would be a very
> large project.

Couldn't a conversion be done programatically?  Or are there too
many special cases that need wetware intervention?

> Is there a way to add just the time part of date time to timestamp?

Not that I'm aware of.  Unless I'm mistaken you'll have to use
separate DATE and TIME columns and set the date to NULL, else assign
a bogus date where the date is missing, which wouldn't smell very
nice.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/



view thread (2+ messages)

Message-ID: <20050116015036.GA34820@winnie.fuhr.org>
Permalink:  ../20050116015036.GA34820@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20050116015036.GA34820@winnie.fuhr.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mike@fuhr.org, jfradkin@wazagua.com
  Subject: Re: I am writing a MS SQL server conversion utility and am having an issue with timestamp
  In-Reply-To: <20050116015036.GA34820@winnie.fuhr.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox