Re: How to format date
Date: Tue, 1 Jun 2021 04:10:04 +0300
Message-ID: <CAOVevU5Zd212DE-guWigpdL_Wi3xuAd4r+Rpt_RTPFpFxhu6Ow_at_mail.gmail.com>
Hi Eriovaldo,
You can either use TZR, ie tz region:
or use hard coded TZR with own saving time condition:
select
Best regards,
On Tue, Jun 1, 2021, 02:39 Eriovaldo Andrietta <ecandrietta_at_gmail.com>
wrote:
> Hi,
select
to_char(
timestamp '1995-10-14 00:00:00'
at time zone 'America/Sao_Paulo'
, 'DY MON dd hh24:mi:ss TZR') str
from dual;
to_char(
tstmp
, 'DY MON dd hh24:mi:ss ' ||
case when 1=1 then '"BRST"' else '"BRT"' end) str
from (
select
timestamp '1895-10-14 00:00:00'
at time zone 'America/Sao_Paulo' as tstmp
from dual)
Sayan Malakshinov
Oracle performance tuning expert
Oracle Database Developer Choice Award winner
Oracle ACE Associate
http://orasql.org
>
> I know that the date 01/01/2016 has the result : 'SUN JAN 01 00:00:00 BRST
> 2006' ...
> This format was generated by java code.
> "BRST" means saving time. In fact it was the period of the saving time in
> 2006.
>
> How can I format this date : 14/10/1895 in the same format above using sql
> ?
>
> Regards
> Eriovaldo
>
>
>
>
>
-- http://www.freelists.org/webpage/oracle-lReceived on Tue Jun 01 2021 - 03:10:04 CEST