× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Just wanted to thank everyone that replied.

We are now using Scotts JDBCR4 to access the PostGreSQL database using the
options provided by Jack to create Epoch dates to be used in the selection
of data for the required date range.

The retrieved data is then written out to Excel using HSSFR4 (again thanks
Scott0 in the IFS and the DB2 SQL enables the Epoch dates to be converted
to the required date format for excel, thanks Peter Dow.

The invoicing process then attaches the Excel with the Invoice PDF and
Emails both to the required recipient.

This has effectively taken a two plus day, very manual process to a two
minute task at end of month.

Accounts are a happy team.

The Midrange team are awesome!!!

Cheers

Don





From: dr2@xxxxxxxx
To: "Midrange Systems Technical Discussion"
<midrange-l@xxxxxxxxxxxxxxxxxx>
Date: 31/05/2023 08:01 AM
Subject: Re: LONGTODATE and DATETOLONG
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxxxxxxxx>



Don,

Would these be of any help?

https://www.candidjava.com/tutorial/java-program-to-convert-long-to-date-object-and-date-object-to-long/


https://www.roseindia.net/java/java-conversion/LongToDate.shtml

https://www.youtube.com/watch?v=to8tI5A_k9A

https://www.youtube.com/watch?v=ez96SE72D74

??

/DR2

On 2023-05-29 23:57, Don Brown via MIDRANGE-L wrote:

We need to process data from a non DB2 source that will be loaded into
DB2
on IBMi

The dates are stored in a long format and my google skills are failing
on
finding how to convert.

I can find a unix site that will convert it for me but not how to do it
as
the end requirement will be to do it in RPG

For testing we are using DBeaver to access the PostGre SQL database and
while it appears from the sample that there should be functions to do
this
we just get an error that the function does not exist.

Here s an example of the date

Database value: 1680762720000

This represents the following

GMT: Thursday, April 6, 2023 6:32:00 AM
local time: Thursday, April 6, 2023 4:32:00 PM GMT+10:00

I would be happy with just a standard time stamp like 06-04-2023
16:32:00

Thank you for any assistance provided.

Cheers

Don

--
This email has been scanned for computer viruses. Although MSD has taken
reasonable precautions to ensure no viruses are present in this email, MSD
cannot accept responsibility for any loss or damage arising from the use
of this email or attachments..

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.