× 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.



I tried that but I know I wasn't doing it right. I had a date field (type "L") defined in my physical file. When I tried doing a move into the field, I kept coming up with an "invalid date or time stamp" message. I guess I just don't know the correct way to move the value into the date field. I tried sever different ways but to no avail...

My RPG program pulls in the hire date from an employee file. This field is defined as 8/0 numeric. My problem arises when I multiply this number by 10000.0001 to reverse it from yyyy/mm/dd to mm/dd/yyyy and move it into the date field

From Physical file DDS:
A            CPHIRED         L          DATFMT(*MDY) COLHDG('HIRE DATE')

I was doing something like this (but have since removed the code from the program):

C PMHIRED MULT 10000.0001 PMHIRED <-- NUMERIC (8/0)
C *MDY MOVE PMHIRED CPHIRED <-- DEFINED WITH DATA TYPE "L"
IN THE PHYSICAL FILE ON ISERIES


Is this what I should be doing?









From: "Haas, Matt" <Matt.Haas@xxxxxxxxxxx>
Reply-To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
Subject: RE: Dates in POI Sql2Xls
Date: Tue, 8 Mar 2005 08:40:36 -0500

Bob,

I've only ever used POI from Java but have you tried using an actual date data type to store the date? I know that storing dates works `cause I've done it before. You may want to take a look at the Javadoc for the method you're trying to call and make sure that you're passing an appropriate object type into it.

Matt

-----Original Message-----
From: Bob O. [mailto:otis_the_cat@xxxxxxxxxxx]
Sent: Tuesday, March 08, 2005 8:17 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Dates in POI Sql2Xls


I have one more issue with the POI sql2xls programs.

I was trying to save an employee's hire date into a date data type field
in a physical file and then move that date into the excel sheet the POI
program creates. It doesn't seem to do what I want it to do (of course).


Is my issue with the date field in the physical file? If so, how should I
store the date in the physical file so the POI program can easily convert
it to a date in the spreadsheet? When I store it in a plain old 8/0
numeric field, it just moves the text to the cell instead of formatting as
a date.
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



-- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.