Query with error - DOW FROM timestamp

Started by Sterpu Victoralmost 12 years ago3 messagesgeneral
Jump to latest
#1Sterpu Victor
victor@caido.ro

Hello

When I run the query from down I receive an error.
How can I write this query to receive the day ot the week.
SELECT EXTRACT(DOW FROM timestamp TO_TIMESTAMP('14-10-2011',
'DD-MM-YYYY'));

Thank you

#2Laurenz Albe
laurenz.albe@cybertec.at
In reply to: Sterpu Victor (#1)
Re: Query with error - DOW FROM timestamp

Victor Sterpu wrote:

When I run the query from down I receive an error.
How can I write this query to receive the day ot the week.
SELECT EXTRACT(DOW FROM timestamp TO_TIMESTAMP('14-10-2011', 'DD-MM-YYYY'));

Maybe you mean

SELECT EXTRACT(DOW FROM TO_TIMESTAMP('14-10-2011', 'DD-MM-YYYY'));

Yours,
Laurenz Albe

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Sterpu Victor
victor@caido.ro
In reply to: Laurenz Albe (#2)
Re: Query with error - DOW FROM timestamp

Yes, thank you.

------ Original Message ------
From: "Albe Laurenz" <laurenz.albe@wien.gv.at>
To: "Victor Sterpu" <victor@caido.ro>; "PostgreSQL General"
<pgsql-general@postgresql.org>
Sent: 5/23/2014 12:51:30 PM
Subject: RE: [GENERAL] Query with error - DOW FROM timestamp

Victor Sterpu wrote:

When I run the query from down I receive an error.
How can I write this query to receive the day ot the week.
SELECT EXTRACT(DOW FROM timestamp TO_TIMESTAMP('14-10-2011',
'DD-MM-YYYY'));

Maybe you mean

SELECT EXTRACT(DOW FROM TO_TIMESTAMP('14-10-2011', 'DD-MM-YYYY'));

Yours,
Laurenz Albe

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general