Re: function for current date-time

From: Reid Thompson <Reid(dot)Thompson(at)ateb(dot)com>
To: Harpreet Dhaliwal <harpreet(dot)dhaliwal01(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: function for current date-time
Date: 2006-10-16 19:03:24
Message-ID: 1161025404.5517.2.camel@jhereg
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 2006-10-16 at 14:56 -0400, Harpreet Dhaliwal wrote:
> Hi,
> I have a timestamp field in my table and want to set a default value
> of current date/time for it.
> What should i enter as its default value? is there any function like
> now() in postgres?
>
> Thanks,
> ~Harpreet

test=# select now();
now
-------------------------------
2006-10-16 15:03:13.174644-04
(1 row)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vivek Khera 2006-10-16 19:04:21 Re: RES: Dates rejected
Previous Message Richard Broersma Jr 2006-10-16 19:02:35 Re: difference b/w text and varchar datatypes