Re: timestamp check - Mailing list pgsql-general

From Ramesh T
Subject Re: timestamp check
Date
Msg-id CAK8Zd=uFOE-Zm9-EnnNzsdvDJ+atf8PcqTZz1RVx4hO2UH_jHg@mail.gmail.com
Whole thread Raw
In response to Re: timestamp check  (Ramesh T <rameshparnanditech@gmail.com>)
List pgsql-general
any help..?

On Sun, Jul 12, 2015 at 11:51 AM, Ramesh T <rameshparnanditech@gmail.com> wrote:
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..

Inline image 1


But in oracle using systimestamp,to_timestamptz and SS TZH is not supporting  to_timestamp in postgres.

result..

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.klaver@aklaver.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.klaver@aklaver.com


Attachment

pgsql-general by date:

Previous
From: Ramesh T
Date:
Subject: Re: xmltable in postgres like in oracle..?
Next
From: Ramesh T
Date:
Subject: Re: xmltable in postgres like in oracle..?