Re: Previous month function
| От | Aleksander Kmetec |
|---|---|
| Тема | Re: Previous month function |
| Дата | |
| Msg-id | 419B374E.1020105@intera.si обсуждение исходный текст |
| Ответ на | Previous month function ("Matt Arnilo S. Baluyos" <mbaluyos@sni.ph>) |
| Ответы |
Re: Previous month function
|
| Список | pgsql-novice |
You can do something like this:
test=> select NOW() - '1 month'::interval;
?column?
-------------------------------
2004-10-17 12:31:09.944818+02
Simply replace NOW() with your timestamp column.
Regards,
Aleksander
Matt Arnilo S. Baluyos wrote:
> hello everyone,
>
> is there already a built-in function that returns the previous month from the
> current timestamp? (and includes functionality to turn back one year if
> current month is january)
>
> i don't want to reinvent the wheel but if there's none then i guess i would
> just have to make one from scratch.
>
В списке pgsql-novice по дате отправления: