Re: How to find out the weekday from a date???

Поиск
Список
Период
Сортировка
Искать
От
Thomas Lockhart
Тема
Re: How to find out the weekday from a date???
Дата
Msg-id
3B5452D5.C408178F@fourpalms.org
Список
Дерево обсуждения
Re: How to find out the weekday from a date??? Thomas Lockhart <lockhart@fourpalms.org>
> I want to extract the weekday of a given 'date' type field in my table
> when selecting. How can I do this?
...
> select extract(dow from timestamp(day)), day, userid
>  from bschft_days where date_part('month', day) = '3';
...
> ERROR:  parser: parse error at or near "dow"

That seems to work on 7.1.x. Perhaps you are using an older version? In
either case, you can try putting single quotes around "dow", like

  select extract('dow' from timestamp(day)), day, userid
   from bschft_days where date_part('month', day) = '3';

hth

                      - Thomas
В списке pgsql-general по дате отправления
От: Ben-Nes Michael
Дата:
Сообщение: Re: VACUUM ANALYZE
От: Mitch Vincent
Дата:
FAQ