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



Gail,

Are you dates in Julian or Gregorian format first off?

They need to be in MMDDYY format, then you can create a field called nodays
and do the following:
Field   Expression
NODAYS      days(date2) - days(date1)  (date2 and date1 need to be in MMDDYY
format.


If your dates are in Julian you can do the following:
Field           Expression
DATE1       date(substr(digits(fildt1+1900000    (fildt1 is the file julian
date field)
            ),2,7))
DATE2       date(substr(digits(fildt2+1900000    (fildt2 is the file julian
date field)
            ),2,7))
NODAYS      days(date2) - days(date1)


date2 = should be a date in the future, BUT it does not have to be, it will
show a + or - Number of
days. In the above example date2 is a future date and date1 is in the past.
In either example the results are below:

09/29/00  10/03/00            4
10/06/00  10/10/00            4
10/13/00  10/17/00            4
10/20/00  10/24/00            4
10/27/00  10/31/00            4
11/03/00  11/07/00            4
11/10/00  11/14/00            4
11/17/00  11/21/00            4
11/22/00  11/28/00            6
12/01/00  12/05/00            4
12/08/00  12/12/00            4
12/15/00  12/19/00            4
12/21/00  12/26/00            5
01/05/01  01/09/01            4
01/12/01  01/16/01            4
01/19/01  01/23/01            4
01/26/01  01/30/01            4
02/02/01  02/06/01            4
02/09/01  02/13/01            4

This will work crossing years too.

Jim Rubino
Senior Business Systems Analyst
FIKE CORPORATION
704 South 10th Street
Blue Springs, Mo.? 64013
(816)?229-6216? Ext. 213
?




-----Original Message-----
From: gcrane@xxxxxxxxxxxxxxx [mailto:gcrane@xxxxxxxxxxxxxxx]
Sent: Thursday, February 27, 2003 2:37 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Query calc # days


OK, you all know I am not technical.  My programmer is on vacation.  I 
need to do a compare of date1 to date2 and calculate the number of days 
between.  Can I do that in a query?  If yes, any direction of how would be 
greatly appreciated.

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