Re: How to find out the weekday from a date???

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jose Manuel Lorenzo Lopez <jose-manuel(dot)lorenzo-lopez(at)ica(dot)conti(dot)de>
Cc: Mitch Vincent <mvincent(at)cablespeed(dot)com>, PGSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to find out the weekday from a date???
Date: 2001-07-17 17:25:11
Message-ID: 25639.995390711@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jose Manuel Lorenzo Lopez <jose-manuel(dot)lorenzo-lopez(at)ica(dot)conti(dot)de> writes:
> I am using Postgresql 7.0.3!

Support for 'dow' in extract() is new in PG 7.1. Time to update.

Or use the underlying date_part function:

play=> select date_part('dow', now());
date_part
-----------
2
(1 row)

seems to work fine in 7.0 as well as 7.1.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2001-07-17 17:25:49 Re: VACUUM ANALYZE
Previous Message Richard Béneyt 2001-07-17 17:21:25 What about crash recovery methods with PostgreSQL 7.1 ?