WW - Date Difference Across Years

scott_parker

Reputable Poster
Greetings


I have a bunch of WW's out there that I just found out are all messed up.

The problem is-- I use a calculated field to subtract two Julian dates to get the number of days between. Or number of Days Late.

Well Julian now wont work if one date is a 2000 date and the other is 2001.
Unfortunately, this isn't always the case either. Most of the times they are within the same year.. But this being January.. Request date and ship date could (and do) Span the year end.

Also, When selecting in WW where One days = Another Date I end up having to make 2 calculated fields with just the Julian date as a value..
JDE Needs to fix that. IMHO.

Any Ideas?

Scott Parker
Grote Industries, LLC.
WorldSoftware Version 8.1.2 AS/400 V4R5
 
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C07A6C.F5A98C80
Content-Type: text/plain

I have the same problem! Is there a quick fix out there anywhere?

Shelly Johnson
* IT Analyst
Hancor, Inc.
419/421-5449
 
Hi Scott,
first of all you have to tell me what IMHO means. second, i am now one
world and not familiar with world but some rpg logic may help i hope....been
programming on an as400 for years and years.
in any case, you may well be able to use the AS400 *LONGJUL (at least
that is how i think it is spelled). movel the year parts into two variables
(original and today's date i assume) and use this to determine if they are the
same year. if the same year there is no problem.
if they are not the same year the first date will be in the previous year.
subtract the original date's julian days from 365 and add it to the regular julian
days of the second date. you may be off by one if one of the years is a leap
year but i would think this would be inconsequential.
if you cannot access this system function in WW i am sure a call to an rpg
pgm would work.
good luck,
dave


NT 4.0 SP5, SQL 7.0, One World B7321 SP12.4, Citrix
 
IMHO = In My Humble Opinion.

The reply you sent may work. but we do not have access to the WW program source. World Writer (WW) is supposed to be a Quick report writter type program that some more "Advanced" type of users can use.
I myself am a programmer but I make up a LOT of WW reports for the users to run.

I will have to write these programs over in RPG if I can not come up with a way to do it "Inside" World Writer. (and I have enough stuff to do already) What took me 5 mins to write as a WW would take me 1-2 days in RPG.
(just said I was A programer - not a fast one. hehe)

Scott Parker
Grote Industries, LLC.
WorldSoftware Version 8.1.2 AS/400 V4R5
 
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C07A74.175F2400
Content-Type: text/plain

IMHO
In My Honest Opinion

Michael Grejtak
Systems Analyst
Raw Material/Inventory/Manufacturing
Hancor, Inc.
(419)424-8253

>
 
can't you make a call to an external rpg pgm ???? i would have thought that was built into world writer. the rpg code for this one would take about an hour to write & test (IMHO --- tee hee hee).
dave
ps: maybe i should stay in my own forums, eh ? :->

NT 4.0 SP5, SQL 7.0, One World B7321 SP12.4, Citrix
 
Re: RE: WW - Date Difference Across Years

I think i like "In My Humble Opinion" better. i could use more of that.


NT 4.0 SP5, SQL 7.0, One World B7321 SP12.4, Citrix
 
In most JDEdwards files there is a century indicator as well as a 4 digit
year. If you use the 4 digit year you should be able to complete the
calculations your looking for.

Michael H. Morgan
Director of Consulting
DataPark Inc.

Office - (817)379-8593
Mobile - (972)740-3999

[email protected]
 
I have a file named F00CAL that we use that has the following date formats
that I can upload to jdelist if people are interested:

JULIAN DATE, AS 98365

GREGORIAN MM/DD/YY

GREGORIAN MM/DD/CCYY

WEEKDAY NAME

XXGMDY IN ZONED

XXGDAT IN ZONED


>
 
I know of no way to make an external call to a program from within WW.

I could put some sort of "Shell" around it but if I am going to take the time to write an RPG then I may as well just write the whole thing.

There are only a handful of WW's (20 or so) but I could probally write about 4 dream writers that cover all.

I just wonder how JDE is handleing this in their own Date Routines. Guess I should look at that code.

And no you should not stay in your own forums. IMHO..

Scott Parker
Grote Industries, LLC.
WorldSoftware Version 8.1.2 AS/400 V4R5
 
Re: RE: WW - Date Difference Across Years

F4211 is the file I am currently looking at. (F42119 is probally next)

F4211 does have Century value is always 20
F4211 also has Fiscal Year Value is always 0

I dont know why the value for the fiscal year is alway 0 but even if it was 01 for 2001 and 00 for 2000

I don't understand how that would help.?.

Scott Parker
Grote Industries, LLC.
WorldSoftware Version 8.1.2 AS/400 V4R5
 
--0__=b8RPHKatWfv57wR30lxjJr8lrdYaN4veHC20AD6z81nO0gLmFstevYWx
Content-type: text/plain; charset=us-ascii
Content-Disposition: inline


I found some WW in I believe group Q43 that did some calculations on the date so
you would be able to subtract them correctly. Unfortunately, my Q43 has been
cleaned out. Try looking in a pristine environment for WW in this group and
they should be there. I was on 7.3 cum 10 at the time. Debbie Kazinski
Pentair Water Treatment.




"Johnson, Shelly" <[email protected]> on 01/09/2001 12:49:56 PM

Please respond to [email protected]

To: "'[email protected]'" <[email protected]>, [email protected]
cc: (bcc: Debbie Kazinski/FLECKHQ/PENTAIR/US)

Subject: RE: WW - Date Difference Across Years ~~0:3575



I have the same problem! Is there a quick fix out there anywhere?

Shelly Johnson
* IT Analyst
Hancor, Inc.
419/421-5449
 
Re: RE: WW - Date Difference Across Years

Thanks IT looks like that May work.

I just printed the Cover sheet so I will test it out and Let you know.

WW group Q43/XJDE0001 was the one I think you were talking about.


Again Thanks.

Scott Parker
Grote Industries, LLC.
WorldSoftware Version 8.1.2 AS/400 V4R5
 
Using an ILE pgm you can determine the days between
two dates with OP CODE = SUBDUR
Ex:
Factor 1 = Date1
Factor 2 = Date2
Opcode = SUBDUR
Result = # of days between

Raymond T. Bassett
Systems Group
NEPTCO, Inc.
401-722-5500 x177
401-728-9932 fax
www.neptco.com
[email protected]

*******************Internet Email Confidentiality Footer*******************
Privileged/Confidential Information may be contained in this message. If
you are not the addressee indicated in this message (or responsible for
delivery of the message to such person), you may not copy or deliver this
message to anyone. In such case, you should destroy this message and kindly
notify the sender by reply email. Please advise immediately if you or your
employer do not consent to Internet email for messages of this kind.
Opinions, conclusions and other information in this message that do not
relate to the official business of my firm shall be understood as neither
given nor endorsed by it.
 
Ok Thanks to Debbie Kazinski for pointing me to that WW it did work.

I am going to post part of the coversheet here just in case someone does not have that version she mentioned.

Field
PDPDDJ Scheduled Pick . . . . 8 0

Y1 year pick 8 0
integer(pdpddj/1000)

D1 day pick 8 0
pdpddj - y1 * 1000

PDADDJ Actual Ship. . . . . . 8 0

Y2 year ship 8 0
integer(pdaddj / 1000)

D2 day ship 8 0
pdaddj - y2 * 1000

DIFF difference new 4 0
y2 * 365 + d2 - y1 * 365 -d1

I wanted it displayed as a positive number which is why I changed it to subtract date1 from date2


Thanks Again.

Scott Parker
Grote Industries, LLC.
WorldSoftware Version 8.1.2 AS/400 V4R5
 
Re: RE: WW - Date Difference Across Years

The value of the century field is 20 for years
2000-2099. and 19 for years 1900-1999.

The fiscal year is always the last two digits of the
year. (i.e. 1999-fiscal year is 99; 2000 fiscal year
is 00, 2001 fiscal year is 01.)

hope this helps.


--- scott parker <[email protected]> wrote:
> F4211 is the file I am currently looking at. (F42119
> is probally next)
>
> F4211 does have Century value is always 20
> F4211 also has Fiscal Year Value is always 0
>
> I dont know why the value for the fiscal year is
> alway 0 but even if it was 01 for 2001 and 00 for
> 2000
>
> I don't understand how that would help.?.
>
> Scott Parker
> Grote Industries, LLC.
> WorldSoftware Version 8.1.2 AS/400 V4R5
> --------------------------
> Visit the forum to view this thread at:
>
http://198.144.193.139/cgi-bin/wwwthreads/showflat.pl?Cat=&Board=W&Number=3595
>
>
*************************************************************
> This is the JDEList World Mailing List.
> Archives and information on how to SUBSCRIBE, and
> UNSUBSCRIBE can be found at http://www.JDELIST.com
>
*************************************************************
>


__________________________________________________
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/
 
Thanks, Treasure. I didn't realize there were so many documents out on the
JDE website about how to calculate dates with WorldWriters.

Here's a direct link:

https://knowledge.jdedwards.com/KGComponents/pagegenerators/showbookmarkmain
.asp?BOOKMARKINFO=HomePageRight]https://knowledge.jdedwards.com/pagelaunch
.asp?COOKIENAME=KBTREE0001&PAGE=/Search/KnowledgeBrowser/KnowledgeRe
sult.asp?TAGTERMLIST=\JDEdwards\Products\World\Technical\World
Writer\DateIssues&APPLETSTATE=0|440|266|M1M4M9|M1|M1M5|M1M
4|M1M5M8|M1M5M6|M1M5M2|M1M5M0[contents]https://knowledge.jdedwards
.com/KGComponents/pagegenerators/genknowledgetree.asp

Another way to find out about all 1500 Knowledge papers is here:
http://www.jdetips.com/KnowledgeDocuments.htm

We have links to all 200 categories of Documents on this page. It took me
under 10 seconds to get to the paper Treasure mentioned using this page.

Andy Klee

Klee Associates
J.D. Edwards Certified Professional
Voice: (970) 856-4811
Cel: (203) 223-5216
www.JDETips.com
 
Back
Top