know the day from timestamp..

From: Lee Kindness <lkindness(at)csl(dot)co(dot)uk>
To: jerome <jerome(at)gmanmi(dot)tv>
Cc: PostgresGeneral <pgsql-general(at)postgresql(dot)org>, Lee Kindness <lkindness(at)csl(dot)co(dot)uk>
Subject: know the day from timestamp..
Date: 2002-09-12 12:57:50
Message-ID: 15744.36686.959994.74546@kelvin.csl.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

See:

http://www.postgresql.org/idocs/index.php?functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT

in particular for your example:

SELECT EXTRACT(DOW FROM TIMESTAMP '2002-09-12 20:44:21');

Lee.

jerome writes:
> is there a function that will say the day (monday... sunday) in numeric...
>
> input -- 2002-09-12 20:44:21+08 or just date -- 2002-09-12
>
> will output thursday or 4 just like the date command for the shell..

In response to

Browse pgsql-general by date

  From Date Subject
Next Message jerome 2002-09-12 13:05:11 know the day from timestamp..
Previous Message Gaetano Mendola 2002-09-12 10:39:39 Re: pgplsql and parameters question