On Sat, Nov 08, 2008 at 07:44:45AM -0500, David Spadea wrote:
> Gerhard,
>
> Check out:
>
> http://www.postgresql.org/docs/8.3/interactive/functions-datetime.html
>
> In particular, look at 'age()' or 'justify_days()', but I think age() is the
> one you want.
>
>
> SELECT age('2008-02-01'::ti
DONE
thank you very much.
Best Regards,
Alam Surya
- Original Message -
From: "Sam Mason" <[EMAIL PROTECTED]>
To:
Sent: Monday, November 10, 2008 18:50
Subject: Re: [GENERAL] Get interval in months
On Mon, Nov 10, 2008 at 12:06:04PM +0700, dbalingl
On Mon, Nov 10, 2008 at 12:06:04PM +0700, dbalinglung wrote:
> Dear Expert,
>
> I have a function to getting time interval bellow :
>
> create or replace function scmaster.pr_gettimeinterval(time without time
> zone, time without time zone, numeric(5,2)) returns char(10) As '
> declare v_timein
>From: "A. Kretschmer" <[EMAIL PROTECTED]>
>
>select into v_output ((v_timeout - v_timein) ...
>
>Done, works for me.
>
ok, maybe you mean :
select ((v_timeout - v_timein) - interval ''v_timebreak minutes'') into
v_output;
and then if i try to execute my function on pgAdmin with command :
s
am Mon, dem 10.11.2008, um 13:13:05 +0700 mailte dbalinglung folgendes:
> >From: "A. Kretschmer" <[EMAIL PROTECTED]>
> >
> >First, please create a new thread for a new question.
> >
> >
>
> Sorry, ok i create new thread
his is still the old thread, see the References-Headers.
> >select into v_o
From: "A. Kretschmer" <[EMAIL PROTECTED]>
First, please create a new thread for a new question.
Sorry, ok i create new thread
Rewrite the line
v_output := select ((v_timeout - v_timein) ...
to:
select into v_output ((v_timeout - v_timein) ...
(not tested)
please tested your answer
am Mon, dem 10.11.2008, um 12:06:04 +0700 mailte dbalinglung folgendes:
> Dear Expert,
First, please create a new thread for a new question.
>
> I have a function to getting time interval bellow :
>
> create or replace function scmaster.pr_gettimeinterval(time without time zone,
> time with
my variable "v_timebreak" into function ? so i can send
dynamic value for v_timebreak.
please help, thank you.
Alam Surya
- Original Message -
From: "Andreas Kretschmer" <[EMAIL PROTECTED]>
To:
Cc: "Gerhard Heift" <[EMAIL PROTECTED]>
Sent: Saturday
Gerhard Heift <[EMAIL PROTECTED]> schrieb:
> Hello,
>
> I want to get an interval in months from two dates:
>
> SELECT '2008-02-01'::timestamp - '2008-01-01'::timestamp AS '1 month'
>
> Here I want '1 month' and not '31 days' as answer.
How long is a month? 28 days? 31 days? But okay, i will t
Gerhard,
Check out:
http://www.postgresql.org/docs/8.3/interactive/functions-datetime.html
In particular, look at 'age()' or 'justify_days()', but I think age() is
the one you want.
SELECT age('2008-02-01'::timestamp, '2008-01-01'::timestamp) AS "1 month"
Produces: "1 mon"
SELECT justify_d
Hello,
I want to get an interval in months from two dates:
SELECT '2008-02-01'::timestamp - '2008-01-01'::timestamp AS '1 month'
Here I want '1 month' and not '31 days' as answer.
How can I do this?
Regards,
Gerhard
signature.asc
Description: Digital signature
11 matches
Mail list logo