From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@postgresql.org
Subject: Date calculation
Date: Thu, 31 Jan 2019 14:11:14 -0600
Message-ID: <c10b17de-623b-4af3-8a8c-45c4a3a5826d@gmail.com> (raw)
Hi,
v9.6.6
Is there a built in function to calculate, for example, next Sunday?
For example,
postgres=# select current_date, next_dow(current_date, 'Sunday');
date | date
------------|------------
2019-01-31 | 2019-02-03
(1 row)
Thanks
--
Angular momentum makes the world go 'round.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: ronljohnsonjr@gmail.com
Subject: Re: Date calculation
In-Reply-To: <c10b17de-623b-4af3-8a8c-45c4a3a5826d@gmail.com>
References: <c10b17de-623b-4af3-8a8c-45c4a3a5826d@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox