What day is it - when it isn't NOW()? - Mailing list pgsql-sql

From tomg@sqlclinic.net
Subject What day is it - when it isn't NOW()?
Date
Msg-id Pine.LNX.4.44.0308011423030.28566-100000@q8.nrnet.org
Whole thread Raw
Responses Re: What day is it - when it isn't NOW()?  (Rod Taylor <rbt@rbt.ca>)
Re: What day is it - when it isn't NOW()?  (Josh Berkus <josh@agliodbs.com>)
List pgsql-sql
Hi,

SELECT to_char(now(), 'Day');  returns Friday as I'd hoped.
But how do I return the day of the week for a specific date other
than now()?  I'm looking for something along the lines of:
SELECT to_char('2003-08-04', 'Day') without much success.

Can anyone point me to the right function/combination of functions
to achieve this?

Thanks!

-----------------------------------------------------------------------
Thomas Good                                  e-mail: tomg@sqlclinic.net
Programmer/Analyst                           phone:   (+1) 718.818.5528
Residential Services                         fax:     (+1) 718.818.5056
Behavioral Health Services, SVCMC-NY         mobile:  (+1) 917.282.7359

// Welches ist das groessere Verbrechen?
// Massenvernichtungswaffen besitzen oder sie erfinden?




pgsql-sql by date:

Previous
From: Jamie Lawrence
Date:
Subject: Re: Fwd: Bad Join moment - how is this happening?
Next
From: Rod Taylor
Date:
Subject: Re: What day is it - when it isn't NOW()?