public inbox for [email protected]
help / color / mirror / Atom feedRe: Number of days
3+ messages / 3 participants
[nested] [flat]
* Re: Number of days
@ 1970-01-01 00:00 omid omoomi <[email protected]>
0 siblings, 0 replies; 3+ messages in thread
From: omid omoomi @ 1970-01-01 00:00 UTC (permalink / raw)
To: [email protected]; pgsql-general
select date_part('day','@ 4 days 3 hours 2 mins');
date_part
---------
4
HTH
Omid
>From: "Mihai Gheorghiu" <[email protected]>
>To: <[email protected]>
>Subject: [GENERAL] Number of days
>Date: Fri, 6 Jul 2001 14:47:39 -0400
>
>Is there a function that returns the number of days between two dates?
>I found only age, which calculates the difference between two timestamps,
>but the example shows the result as a timestamp.
>Thanks,
>Mihai Gheorghiu
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
>http://www.postgresql.org/search.mpl
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Number of days
@ 2001-07-06 18:47 Mihai Gheorghiu <[email protected]>
2001-07-06 19:47 ` Re: Number of days Tom Lane <[email protected]>
0 siblings, 1 reply; 3+ messages in thread
From: Mihai Gheorghiu @ 2001-07-06 18:47 UTC (permalink / raw)
To: pgsql-general
Is there a function that returns the number of days between two dates?
I found only age, which calculates the difference between two timestamps,
but the example shows the result as a timestamp.
Thanks,
Mihai Gheorghiu
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Number of days
2001-07-06 18:47 Number of days Mihai Gheorghiu <[email protected]>
@ 2001-07-06 19:47 ` Tom Lane <[email protected]>
0 siblings, 0 replies; 3+ messages in thread
From: Tom Lane @ 2001-07-06 19:47 UTC (permalink / raw)
To: Mihai Gheorghiu <[email protected]>; +Cc: pgsql-general
"Mihai Gheorghiu" <[email protected]> writes:
> Is there a function that returns the number of days between two dates?
Subtraction.
regression=# select '27 Feb 2001'::date - '5 Jan 2001'::date;
?column?
----------
53
(1 row)
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2001-07-06 19:47 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1970-01-01 00:00 Re: Number of days omid omoomi <[email protected]>
2001-07-06 18:47 Number of days Mihai Gheorghiu <[email protected]>
2001-07-06 19:47 ` Tom Lane <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox