From: | Ramesh T <rameshparnanditech(at)gmail(dot)com> |
---|---|
To: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: timestamp check |
Date: | 2015-07-12 06:21:50 |
Message-ID: | CAK8Zd=sY9Om5Z33ZJ_SJ5LRd-vzioRNrdFubhsAd-+OsyGq6Nw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
postgres query
select current_timestamp-
TO_TIMESTAMP(to_char(DATE1, 'YYYY-MM-DD HH24'|| ' '||'MI'||' '||'SS')||'
'||(SELECT utc_offset FROM pg_catalog.pg_timezone_names
WHERE name=DATETIMEZOZE1) , ''YYYY-MM-DD HH24'||' '||'MI'||'
'||'SS')::timestamptz
getting result..
[image: Inline image 1]
But in oracle using systimestamp,to_timestamptz and SS TZH is not
supporting to_timestamp in postgres.
result..
[image: Inline image 2]
diffrence is days displaying in postgres query..i thnk something wrong. is
it..?
any help apprictiated.
On Sat, Jul 11, 2015 at 11:12 PM, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:
> On 07/10/2015 05:54 AM, Ramesh T wrote:
>
>>
>> select current_timestamp-to_timestamp(to_char(current_date,'YYYY-MM-DD
>> HH24'||':'||'MI'||':'||'SS')||' '||(SELECT utc_offset FROM
>> pg_catalog.pg_timezone_names
>> WHERE name='US/Eastern'),'YYYY-MM-DD
>> HH24'||':'||'MI'||':'||'SS')::timestamptz;
>>
>> it's not displaying timezone..any help..?
>>
>>
> Forget my previous post, Rays post made me realize the error of my ways,
> namely thinking current_timestamp-to_timestamp was a function.
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>
From | Date | Subject | |
---|---|---|---|
Next Message | Ramesh T | 2015-07-12 12:08:08 | Re: xmltable in postgres like in oracle..? |
Previous Message | James Cloos | 2015-07-11 23:45:52 | Re: How to test SSL cert from CA? |