heinrichh

Get the latest Value between two dates

Discussion created by heinrichh on May 24, 2018
Latest reply on May 31, 2018 by fmnotsopro

Hi,

I have a table with a price-history for articles. Looks like this:

 

Nrdate_fromdate_toprice
130.04.201814.04.201833
201.04.201829.04.201835
301.01.2018 31.03.201830

 

If a newer entry is missed, so the latest entry should be valid for the price

My job is to find out the valid/actual price for that article, if a customer buy it on 20.05.2018.

That means, that the latest valid price for that article is defined for the daterange 30.04.2018 - 14.04.2018.

 

1. How can I get that specific price for the order date 20.05.2018 price?

2. How can I get the price for any specific date, if the Admin wants to get the info for a report e.g.

 

Thanks a lot.

 

Heinrich

Outcomes