Have you seen the Excel help text for dates?  I'm pretty sure you're looking
for a solution that adapts to the Excel date on the upload, but the
explanation of their date format should allow you to come up with a program
using date routines.  Had I been using Client Access file transfer instead
of CPYFRMPCD I would have probably gone this route.

They're using serial numbers starting at January 1, 1900 or January 2, 1904.
If I were converting using a program I'd just add the file value to the
January date as a number of days.

-Jim

>From Microsoft Excel Help:

How Microsoft Excel stores dates and times
Microsoft Excel stores dates as sequential numbers known as serial values.
Excel stores times as decimal fractions because time is considered a portion
of a day. Dates and times are values and, therefore, can be added,
subtracted, and included in other calculations. For example, to determine
the difference between two dates, you can subtract one date from the other.
You can view a date as a serial value and a time as a decimal fraction by
changing the format of the cell that contains the date or time to General
format.

Excel supports two date systems: the 1900 and 1904 date systems. The default
date system for Microsoft Excel for Windows is 1900. To change to the 1904
date system, click Options on the Tools menu, click the Calculation tab, and
then select the 1904 date system check box.

The following table shows the first date and the last date for each date
system and the serial value associated with each date.

Date
system        First date           Last date
1900          January 1, 1900      December 31, 9999
              (serial value 1)     (serial value 2958465)

1904          January 2, 1904      December 31, 9999
              (serial value 1)     (serial value 2957003)

-----Original Message-----
From: Alan Novick [mailto:mida@pressmantoy.com]
Sent: Tuesday, December 11, 2001 3:10 PM
To: midrange-l@midrange.com
Subject: Re: Upload Date Data from Excel


Wow Jim that was a very creative solution.  It would be a bit cumbersome in
my situation.  Our warehouse vendor is sending us a file of open orders and
I want to compare for discrepancies with our order files.  Several of the
columns they are sending are date fields.  I guess there must be
documentation on how to convert that Excel number to a date but I was hoping
IBM or someone else had done it for me :)

Alan Novick
Pressman Toy Corporation
New Brunswick, NJ
----- Original Message -----
From: "Jim Damato" <jdamato@dollargeneral.com>
To: <midrange-l@midrange.com>
Sent: Tuesday, December 11, 2001 3:46 PM
Subject: RE: Upload Date Data from Excel


The last time I did this I ended up concatenating the character values of
the Excel DAY, MONTH, and YEAR functions into another column, and dropping
the value of that string into another.  I just searched, but I don't still
have the spreadsheet.  It took a long time to debug, but I had given up on
dealing with the integer value behind the date cells, and couldn't find an
easy way to translate dates into values while retaining the format.

I'm sure there's a better way...

-Jim

James P. Damato
Manager - Technical Administration
Dollar General Corporation
<mailto:jdamato@dollargeneral.com>


-----Original Message-----
From: Alan Novick [mailto:mida@pressmantoy.com]
Sent: Tuesday, December 11, 2001 1:37 PM
To: MidRange-L
Subject: Upload Date Data from Excel


I have an Excel spreadsheet with columns that are dates.  When I upload to
the AS/400 it becomes a number.  Anyone know how to bring the date up?

Thanks,
Alan Novick
Pressman Toy Corporation
New Brunswick, NJ




As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.