but, curiously, this request gives me 1 day forward comparing to the effective date in OnDemand :
Original Message:
Sent: Tue July 09, 2024 03:25 AM
From: Petr Slepánek
Subject: How to convert a DB2 date in a human understanding format ?
Hi Manuel,
maybe this approach can help (eg. create a function and then use it in a SQL query):
https://ibexoft.com/converting-oracle-date-types-and-phpunix-timestamps/
Petr
------------------------------
Petr Slepánek
Original Message:
Sent: Tue July 09, 2024 02:08 AM
From: Manuel PAITREAULT
Subject: How to convert a DB2 date in a human understanding format ?
Thanks a lot for your quick reply Petr.
I had noticed that I could convert manually and individually these numerics with IBM tool arsdate, but I would like to manipulate them directly in (PL-)SQL commands. For example, how could I select rows in a table (with a SQL where clause condition) for a specific year ?
Thanks
------------------------------
Manuel PAITREAULT
Original Message:
Sent: Mon July 08, 2024 03:37 PM
From: Petr Slepánek
Subject: How to convert a DB2 date in a human understanding format ?
Hi,
theese attributes are stored in a Unix Timestamp format (generally it represents number of seconds since Jan 01 1970. (UTC)). For example -> 1648736172 represents Thu Mar 31 2022 14:16:12 GMT+0000.
You can convert theese timestamps for example here (but there are a lot of conversion sites online etc.) - https://www.unixtimestamp.com/
Have a nice day!
Petr
------------------------------
Petr Slepánek
Original Message:
Sent: Mon July 08, 2024 01:36 PM
From: Manuel PAITREAULT
Subject: How to convert a DB2 date in a human understanding format ?
Good evening,
some dates are encoded in a numeric way (BIGINT/SMALLINT) in the DB2 database of OnDemand :
for example, column START_DATE of ARSSEG table (looks like 18213)
or column POST_DATE of ARSSEG table (looks like 1648736172).
How can I convert them in a human readable way when I request the database (in date or timestamp formats, or trunc in year/month/day etc ...) ?
Thanks in advance
Regards
------------------------------
Manuel PAITREAULT
------------------------------