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



Fantastic!  THANK YOU Thank You.  It worked.  I am all smiles and thank 
you for teaching me a great lesson.

Gail Crane
Johanson Manufacturing Corp.
phone 973-334-2676
gcrane@xxxxxxxxxxxxxxx




"Richard B Baird" <rbaird@xxxxxxxxxxxxxxxxxxxxx>
Sent by: midrange-l-bounces@xxxxxxxxxxxx
03/03/2003 01:29 PM
Please respond to Midrange Systems Technical Discussion

 
        To:     Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
        cc: 
        Subject:        Re: Query calc # days



Gail,

my help wasn't very helpful, since what I suggested doesn't work.... :(

I have tried and tested this, so it should be good.

First, (at least temporarily) change your job date format this way:

chgjob datfmt(*ymd)

date format will only last as long as your session or job.

Then, assuming you have two dates CYYMMDD, create these fields in your
query:

YY1         substr(digits(filedate1),2,2)

MM1         substr(digits(filedate1),4,2)

DD1         substr(digits(filedate1),6,2)

YY2         substr(digits(filedate2),2,2)

MM2         substr(digits(filedate2),4,2)

DD2         substr(digits(filedate2),6,2)

DAYSDIFF    days(date(yy1||'/'||mm1||'/'||dd1
            ))-days(date(yy2||'/'||mm2||'/'||
            dd2))

resulting query gives this:

 filedate1   filedate2      DAYSDIFF
  990,115     991,001           259-
  991,231   1,000,101           364
  991,230   1,020,101           363
1,020,101   1,020,201            31-



hope this helps,

Rick

---original message-----
First, thanks to all of you for helping me with this issue.

No, I have not been successful using query to get the # days calculated.
All due to the field format.   I have tried every flavor and then some.
I gotta say I sure have learned alot about query.  I was success ful in
getting the day to the right 8 char but after I got it to charactor day
could not get it back to numeric date format.


Gail Crane
Johanson Manufacturing Corp.
phone 973-334-2676
gcrane@xxxxxxxxxxxxxxx

_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing 
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.