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


  • Subject: Re: Query/400 Trainee
  • From: "Bob Kohlndorfer" <kohlnbob@xxxxxxxxxx>
  • Date: Wed, 28 Jun 2000 14:40:42 -0500

Your problem is that you are trying to add the lead time to the actual date.
You need to convert the date to days then add your lead time then convert
the result back into a date.
Today =         Current(Date)
PlanDays =    DAYS(Today) + 3
PlanDate =     Date(PlanDays)

Bob

----- Original Message -----
From: <MacWheel99@aol.com>
To: "BPCS Users Discussion Group" <BPCS-L@midrange.com>
Sent: Tuesday, June 27, 2000 10:07 PM
Subject: Query/400 Trainee


> Thanks to past posts here we've got date math to work on BPCS dates.  For
> example:
>
> Today       = Current (Date)
> DA      = Digits (BPCS Date Field)
> DB      = Date (Substr (DA,5,2)||'/'||
>               Substr (DA,7,2)||'/'||
>               Substr (DA,3,2))
> Days_Ago    = Days (Today) - Days (DB)
>
> Query Selection
>
> Days_Ago    LE  7   and other stuff
>
> Now I want to figure another direction: add lead time days to current
date,
> to get how far out is safe to accept customer order changes without
factory
> disruption.
>
> We have populated a file with cumulative lead time to manufacture end
item,
> including ordering raw materials and how long to manufacture in house,
> assuming got enuf raw.  Now we want to use this in queries.  The lead time
> days fields are 3 long with zero decimal places.
>
> Plan_Date   = Current (Date) + Lead
>
> This is not allowed
> Date, Time, or Tmestamp expression is not correct
> "Lead" is what is highlighted as problem point
>
> In_Lead = Days (Digits (Lead))
>
> It accepts this as a valid line
>
> Plan_Date   = Current (Date) + In_Lead
>
> It is not accepting In_Lead either as valid days to add to current date
>
> Is it obvious to anyone where I'm not connecting with Query/400 date math
> logic?
>
> I can write an RPG to do this.  What I want is an AL GO RHYTHM that I can
> supply to my query users, so that they can use the cumulative lead time in
my
> new file.
>
> Thanks
>
> Al Macintyre  ©¿©
> http://www.cen-elec.com MIS Manager Programmer & Computer Janitor
> +---
> | This is the BPCS Users Mailing List!
> | To submit a new message, send your mail to BPCS-L@midrange.com.
> | To subscribe to this list send email to BPCS-L-SUB@midrange.com.
> | To unsubscribe from this list send email to BPCS-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner: dasmussen@aol.com
> +---
>


+---
| This is the BPCS Users Mailing List!
| To submit a new message, send your mail to BPCS-L@midrange.com.
| To subscribe to this list send email to BPCS-L-SUB@midrange.com.
| To unsubscribe from this list send email to BPCS-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: dasmussen@aol.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.