Question about copy from with timestamp format

From: Murali M <manips2002(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Question about copy from with timestamp format
Date: 2015-07-29 22:42:52
Message-ID: CAHN-UzmkSoSPW8PeV2Y-r9H4O6qn_KMwNtOcryY6aDYjAny6Xw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I wanted to copy a file from local file system to postgres. I have
timestamp value specified as:
YYYYMMDDHH24 format -- for example:
2015072913 -- is July 29, 2015 at 13:00

how do I import this data into a timestamp field?

thanks, murali.

PS: I believe if I need the hour, I need to use timestamp (I do not want to
put the hour as a separate column). I believe date datatype does not work,
if I am right??

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2015-07-29 22:49:42 Re: Question about copy from with timestamp format
Previous Message Melvin Davidson 2015-07-29 22:21:57 Re: instr detail