pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark <mark@zserve.com>
To: pgsql-sql@postgresql.org
Subject: Date manipulation
Date: 31 May 2001 10:22:48 -0600
Message-ID: <200105311714.f4VHEbW24511@mail.ldssingles.com> (raw)


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?

Thanks,

Mark




view thread (7+ messages)  latest in thread

Message-ID: <200105311714.f4VHEbW24511@mail.ldssingles.com>
Permalink:  ../200105311714.f4VHEbW24511@mail.ldssingles.com/
Also on:    postgresql.org/message-id/200105311714.f4VHEbW24511@mail.ldssingles.com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mark@zserve.com
  Subject: Re: Date manipulation
  In-Reply-To: <200105311714.f4VHEbW24511@mail.ldssingles.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