Ok, I try.
Also, I have 4 dates in a table, this are the delivery time in days, the delivery date, the goods issue date and the workingday between the delivery date and the goods issue date.
I have the Problem, that I have to calculate the delivery date by my self out of the delivery time and the goods issue date. So it can be, that the delivery date will be on a Saturday or Sunday, but this is not true.
So I help me with the workingdays between the delivery date and the goods issue date.
The delivery time must be the same as the working days between the goods issue date and the delivery date.
Now you can replace a,b,c and d with this four dates.
a should be the working days between the goods issue date and the delivery date, b the delivery time, c the delivery date and d the goods issue date.
In the end I will have a right delivery date, which is not on saturday, or sunday.
Maybe its a lot easier than I tried it.
I hope you understand me and can help me now. If anything is unclear, please ask for it, I try to explain.
Thank you very much für your help!!
thanks very much. It works, but it don't include my holidays.
LOAD Date([Feiertagsdatum]) as Date
FROM .\qvd\Betriebskalenderfeiertage.qvd (qvd);
LOAD concat(chr(39) & tmpFeiertage.Date & chr(39),',') AS Feiertagsdatum
Let vFeiertage = fieldvalue('Feiertagsdatum',1);
DROP TABLE tmpFeiertage;
DROP TABLE tmpVerkettung;
LastWorkDate (date([Temp.Warenausg_-Datum]), Temp.TransportTage, $(vFeiertage)) as Lieferdatum
Is this right? It don't note the holidays.
I think you need to change tmpVerkettung as follows:
LOAD chr(39) & concat(chr(39) & tmpFeiertage.Date & chr(39),',') & chr(39) AS Feiertagsdatum
And I would use peek rather than FieldValue:
Let vFeiertage = Peek('Feiertagsdatum');
The rest of the script looks correct to me.