Skip site navigation (1) Skip section navigation (2)

Date manipulation

From: Mark <mark(at)zserve(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Date manipulation
Date: 2001-05-31 16:22:48
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
How does one perform date manipulation within SQL?  For example, SQL
Server has a dateadd() function that takes a date part, scalar, and the
date to manipulate.

I have a query that determines the number of days that are between now
and a particular date that looks something like this:

select datediff (dd, now (), column) as difference_in_days from ...

Anything available short of coding my own function?




pgsql-sql by date

Next:From: Tom LaneDate: 2001-05-31 16:42:28
Subject: Re: 7.1.1 Lock Problems on Views
Previous:From: Josh BerkusDate: 2001-05-31 16:03:59
Subject: Re: rowset Return from postgresql

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group