<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>24 Apr 2016 00:54:00 Z</lastBuildDate><pubDate>23 Apr 2016 03:56:00 Z</pubDate><description>Hello All&#13;
&#13;
The situation is to find a sell price for a stock item.&#13;
There is a price contract record attached to a debtor and then stock items are attached to the price contract with prices valid for that contract. The contract has a start and finish date which can be a few months or a year or so.&#13;
A debtor invoice has a transaction date so when a line on the invoice requests a sell value for a stock item I need to check if there is a current contract for the debtor where the invoice date is between the start and end dates of the contract.&#13;
&#13;
At the moment I am using Hfilter()&#13;
sBrowseKeyItem is string sBrowseKeyItem = HFilter(DSrvCont, "DRCLEUNIK='"+Debtor.DRCLEUNIK+"'"... +" AND StartDate&lt;="+InvoiceDate+""... +" AND EndDate&gt;="+InvoiceDate+""... +" AND ActiveStatus=1") IF HReadFirst(DSrvCont, sBrowseKeyItem) //There is a valid contract //Go and see if there is a stock item match ELSE //There is no contract so get the value another way END //IF HReadFirst(DSrvCont, sBrowseKeyItem)&#13;
I have also used a query and then tested to see if a record was returned.&#13;
&#13;
Both methods work but seem clumsy so I am asking if there is a better way ?&#13;
&#13;
Regards&#13;
Al</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/57390-wd20-best-way-find-out-date-between/read.awp</link><title>[WD20] Best way to find out if a date is between 2 other dates</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/57390-wd20-best-way-find-out-date-between-57394/read.awp</comments><pubDate>24 Apr 2016 00:54:00 Z</pubDate><description>Hello Piet&#13;
&#13;
Thanks for the idea it got me thinking of other ways. The price contracts are rarely updated so I will look into a…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/57390-wd20-best-way-find-out-date-between-57394/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/57390-wd20-best-way-find-out-date-between-57394/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/57390-wd20-best-way-find-out-date-between/read.awp">[WD20] Best way to find out if a date is between 2 other dates</source><title>Re: [WD20] Best way to find out if a date is between 2 other dates</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/57390-wd20-best-way-find-out-date-between-57393/read.awp</comments><pubDate>23 Apr 2016 11:22:00 Z</pubDate><description>Hi Al,&#13;
&#13;
In the case that contract periods don't overlap (there can only be one contract in a certain period of time), you can …</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/57390-wd20-best-way-find-out-date-between-57393/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/57390-wd20-best-way-find-out-date-between-57393/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/57390-wd20-best-way-find-out-date-between/read.awp">[WD20] Best way to find out if a date is between 2 other dates</source><title>Re: [WD20] Best way to find out if a date is between 2 other dates</title></item></channel></rss>
