pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedday difference
3+ messages / 3 participants
[nested] [flat]
* day difference
@ 2001-06-23 03:31 Jackie Siu <spjackie@polyu.edu.hk>
2001-06-29 14:43 ` Re: day difference Josh Berkus <josh@agliodbs.com>
2001-06-30 04:14 ` Re: day difference Christopher Sawtell <csawtell@xtra.co.nz>
0 siblings, 2 replies; 3+ messages in thread
From: Jackie Siu @ 2001-06-23 03:31 UTC (permalink / raw)
To: pgsql-sql
Hi,
Is there exist a function to calculate day difference between two date. For
example: select functionx('1JAN2001','5FEB2001') from abc where .... Then it
returns 36 (days). Thanks for your help.
Jackie
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: day difference
2001-06-23 03:31 day difference Jackie Siu <spjackie@polyu.edu.hk>
@ 2001-06-29 14:43 ` Josh Berkus <josh@agliodbs.com>
1 sibling, 0 replies; 3+ messages in thread
From: Josh Berkus @ 2001-06-29 14:43 UTC (permalink / raw)
To: Jackie Siu <spjackie@polyu.edu.hk>; pgsql-sql
Jackie,
> Is there exist a function to calculate day difference between two
> date. For
> example: select functionx('1JAN2001','5FEB2001') from abc where ....
> Then it
> returns 36 (days). Thanks for your help.
>
See the thread entitled "DateDiff" earlier this week, or search the
archives.
-Josh
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: day difference
2001-06-23 03:31 day difference Jackie Siu <spjackie@polyu.edu.hk>
@ 2001-06-30 04:14 ` Christopher Sawtell <csawtell@xtra.co.nz>
1 sibling, 0 replies; 3+ messages in thread
From: Christopher Sawtell @ 2001-06-30 04:14 UTC (permalink / raw)
To: Jackie Siu <spjackie@polyu.edu.hk>; +Cc: pgsql-sql
Jackie Siu wrote:
>
> Hi,
>
> Is there exist a function to calculate day difference between two date. For
> example: select functionx('1JAN2001','5FEB2001') from abc where .... Then it
> returns 36 (days). Thanks for your help.
chris=# select ('5feb2001'::date - '1jan2001'::date) as "Days
Difference";
Days Difference
-----------------
35
(1 row)
chris=# select version();
version
---------------------------------------------------------------
PostgreSQL 7.1.1 on i586-pc-linux-gnu, compiled by GCC 2.95.3
(1 row)
--
Sincerely etc.,
NAME Christopher Sawtell
CELL PHONE 021 257 4451
ICQ UIN 45863470
EMAIL csawtell @ xtra . co . nz
CNOTES
ftp://ftp.funet.fi/pub/languages/C/tutorials/sawtell_C.tar.gz
-->> Please refrain from using HTML or WORD attachments in e-mails to
me <<--
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2001-06-30 04:14 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-06-23 03:31 day difference Jackie Siu <spjackie@polyu.edu.hk>
2001-06-29 14:43 ` Josh Berkus <josh@agliodbs.com>
2001-06-30 04:14 ` Christopher Sawtell <csawtell@xtra.co.nz>
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