• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

Date Business Function

karenet

Active Member
Hello,
I am trying to convert a Packed Decimal date, from legacy AS400 files, in CCYYMMDD format into to a JDE julian date format. We are running OneWorld Xe, service pack 16 [I think] using the AS400 as our data base server.

Question: Does anyone out there posess a JDE business function to perform the CCYYMMDD pd date ---> JDE julian date? If not, then any advice will be great. I have searched through the 'canned' Xe business functions and cannot make perfect match.

Thanks in advance.
 

monkpass

Member
If you are doing this in a bolt-on ... you should achieve your goal ... by
defining a work field as 7d Julian and moving your legacy field ... into the
Julian field. What JDE file are you trying to update!

gene
 

Zoltan_Gyimesi

Legendary Poster
Hi,
Let me some question to clatify your issue a bit better:

Q1.) Do yo mean JDE julian date format as OneWorld date?
Q2.) Is it a one-time process (e.g. data upload) or an interface issue or any other recurring task?
Q3.) Where do you want to run your conversion logic, in OneWorld, in the legacy system, in a third application?
Q4.) If you want to run your conversion in OW then how do you access your legacy date, in a field of a OW table (custom or standard) or as a foreign table, etc.?

If you want to convert it in OW and you can access your date as 8 long numeric or 8 character long string then you can easy to write a BSFN to perform the conversion.
a.) You can easily separate Year, Month, Day value from your legacy date using Division and Modulo operations or substring.
b.) You can construct a "MM/DD/YYYY" with concat functions.
c.) You can use B0800013 Convert String To Date system function to convert your string into OW date.

I suppose there are more BSFNs for for date conversion, maybe exists one that exactly matches to your needs. If it is true, somebody will surely let you know on the List/Forum.

Regards,
Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 

pcaenaro

Well Known Member
Hi,

I don't know of a business function to convert directly from CCYYMMDD to
Juliqn, but you could extrqct, qs suggested Zoltan, the Year, Month and Day
and use the "Format Date From DMY" function to get a JDE date.

Hope this helps

Cheers

Philippe
----- Message d'origine -----
De : karenet <wallione@home.com>
À : <jdeowdevml@jdelist.com>
Envoyé : Friday, August 03, 2001 3:49 AM
Objet : Date Business Function


in CCYYMMDD format into to a JDE julian date format. We are running
OneWorld Xe, service pack 16 [I think] using the AS400 as our data base
server.
the CCYYMMDD pd date ---> JDE julian date? If not, then any advice will
be great. I have searched through the 'canned' Xe business functions and
cannot make perfect match.
http://198.144.193.139/cgi-bin/wwwthreads/showflat.pl?Cat=&Board=OWDEV&Numbe
r=18060



One World B7332 SP14.2 AS400
 

tpw_nz

Active Member
Hi,

If you can't find the business function you want you could write a very simple one to use the DeformatDate JDE API.

In your case the C code would read.

/* code start */
sprintf(szDateString,"%d",iDateNumber);
rc = DeformatDate(&jdDate,szDateString,"EOA");
/* code end */

The sprintf will convert your number (iDateNumber) to a string.

EOA means E = YYYY, O = MM, A = DD. Check out the JDEAPI.hlp for more details.

Good luck.
 

karenet

Active Member
Re: RE: Date Business Function

gene,
Currently I'm writing JDE table conversion programs to convert legacy data into OneWorld 'Z' tables. We have a lot, and I mean a lot, of CCYYMMDD dates to convert over into JDE. That's the reason I'm anxious to get a business function, i.e., to save coding time.
We will be implementing JDE financials, Pur to Pay, Order to Cash, budgeting, and maybe another I can't think of right now.

Thanks for your help.
 
Top