pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Achilleus Mantzios <achill@matrix.gatewaynet.com>
To: Pedro B. <pedro.borracha@netcabo.pt>
Cc: pgsql-sql@postgresql.org
Subject: Re: Datetime
Date: Tue, 3 Aug 2004 13:23:14 +0300 (EEST)
Message-ID: <Pine.LNX.4.44.0408031319490.7249-100000@matrix.gatewaynet.com> (raw)
In-Reply-To: <410F3D4B.60405@netcabo.pt>

O kyrios Pedro B. egrapse stis Aug 3, 2004 :

> Hello,
> 
> I'm using a TIMESTAMP column with a now() default which (correctly i 
> assume) uses a 'yyyy-mm-dd hh:mm:ss' format.

Wrong!, timestamp does not use any human readable format to be stored.
Its not like MS* tools where dates/times are actually text.

now() returns the current UNIX (your running UNIX right?) timestamp which 
in turn is
measured in seconds,miliseconds since the epoch.
i.e. 1970-01-01 00:00:00

> 
> Is it possible to make it something like 'yyyy-mm-dd hh:mm:ss:cc' ? 
> (basically, a DATE and a TIME, but with 2 decimal cases on the :cc and 
> not .ccccc as the TIME format.
> 
> Thanks,
> \\pb
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match
> 

-- 
-Achilleus




view thread (11+ messages)  latest in thread

Message-ID: <Pine.LNX.4.44.0408031319490.7249-100000@matrix.gatewaynet.com>
Permalink:  ../Pine.LNX.4.44.0408031319490.7249-100000@matrix.gatewaynet.com/
Also on:    postgresql.org/message-id/Pine.LNX.4.44.0408031319490.7249-100000@matrix.gatewaynet.com

 · 

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: achill@matrix.gatewaynet.com, pedro.borracha@netcabo.pt
  Subject: Re: Datetime
  In-Reply-To: <Pine.LNX.4.44.0408031319490.7249-100000@matrix.gatewaynet.com>

* 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