N
N
Nikolay Baranenko2017-10-25 15:17:01
Oracle
Nikolay Baranenko, 2017-10-25 15:17:01

How to correctly convert a date value from NUMBER to CHAR?

Hello.
In the Oracle database, in the schemas, the date is written in the NUMBER format,
example 1467290851.
How to correctly convert the date value from NUMBER to CHAR?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Komarov, 2017-10-25
@drno-reg

What do you need? From unixtime to receive a normal type of date? If yes, then you can

select to_char(to_date('01.01.1970 00:00:00','dd.mm.yyyy hh24:mi:ss') + 1/24/60/60 * :unixtime, 'dd.mm.yyyy hh24:mi:ss') from dual;

N
Nikolay Baranenko, 2017-10-25
@drno-reg

Found a solution

(date '1970-01-01' + 3/24 + LAST_MODIFIED_DATE /60/60/24)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question