Re: How to format date

From: Eriovaldo Andrietta <ecandrietta_at_gmail.com>
Date: Tue, 1 Jun 2021 00:01:33 -0300
Message-ID: <CAJdDhaNFH905+eMq_d+H2VYnjQSgmQtBjabqBhiznf6Fqx4xCA_at_mail.gmail.com>



Sayan,
It solved my issue.
Many thanks.
Eriovaldo

Em seg., 31 de mai. de 2021 às 22:10, Sayan Malakshinov <xt.and.r_at_gmail.com> escreveu:

> Hi Eriovaldo,
>
> You can either use TZR, ie tz region:
> 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;
>
> or use hard coded TZR with own saving time condition:
> select
> 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)
>
> Best regards,
> Sayan Malakshinov
> Oracle performance tuning expert
> Oracle Database Developer Choice Award winner
> Oracle ACE Associate
> http://orasql.org
>
> On Tue, Jun 1, 2021, 02:39 Eriovaldo Andrietta <ecandrietta_at_gmail.com>
> wrote:
>
>> Hi,
>>
>> 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-l
Received on Tue Jun 01 2021 - 05:01:33 CEST

Original text of this message