isodow
The day of the week as Monday (1) to Sunday (7)
Takže stačí od výsledku odečíst 1:
psql (9.6.1)
Type "help" for help.
postgres=> select extract(isodow from date '2016-12-12') - 1;
?column?
-----------
0
(1 row)
postgres=>
isodow
The day of the week as Monday (1) to Sunday (7)
Takže stačí od výsledku odečíst 1:
psql (9.6.1)
Type "help" for help.
postgres=> select extract(isodow from date '2016-12-12') - 1;
?column?
-----------
0
(1 row)
postgres=>