From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
---|---|
To: | Jude DaShiell <jdashiel(at)panix(dot)com> |
Cc: | pgsql novice <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: showing weekdays of dates |
Date: | 2014-08-29 17:47:42 |
Message-ID: | CAHyXU0ytiOz2ndrKyXtCFoLh9WkBWfkGW3zoke61Btp5-vCjNA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Fri, Aug 29, 2014 at 12:39 PM, Jude DaShiell <jdashiel(at)panix(dot)com> wrote:
> using sr pgdoc I searched for weekdays and though I found a few results I
> couldn't parse from information provided how to get weekdays of dates to
> populate a table in any fashion. When I do more in depth analysis of
> accumulating data sets, some of the analysis I'd like to do would be for
> each of the seven weekdays during a period of time. I ended up with a
> script that does two date calls one for the iso date and the second for
> weekday number and that script writes out the day's insert statement
> correctly with the values it figures out and the values I supply. The whole
> system I have now is for health monitoring blood pressure and blood sugar
> numbers and that's how my doctor gets my numbers for checking progress. It
> didn't take long to write, I like to improve it as I learn new things with
> which I can improve it.
Not completely following your question but perhaps to_char() function
is what you need:
ysanalysis=# select to_char(now(), 'Day');
to_char
───────────
Friday
http://www.postgresql.org/docs/8.1/static/functions-formatting.html
merlin
From | Date | Subject | |
---|---|---|---|
Next Message | Ken Benson | 2014-08-29 17:48:35 | Re: Join three tables and specify criteria... I know this should be easy! |
Previous Message | Paul Linehan | 2014-08-29 17:41:31 | Re: Join three tables and specify criteria... I know this should be easy! |