Hi there - is someone able to tell me, how to select most recent date entry from table?
Ie:
1 2010-01-01
2 2010-04-05
3 2010-02-01
Query should return 2010-01-01
Good example is table 7002 Sales Price where prices for customers are stored - there can be few record per every item number with few dates.
M
0
Comments
Thankesh
***Learn to lead***
Going to try it now
And how to check, if given date is in data range?
Ie: given date 2010-02-01, range 2010-01-20..2010-02-02, returns TRUE
MK
Thankesh
***Learn to lead***
To check if a date is in a certain range use:
IF (myDate>=myMinDate) AND (myDate>=myMaxDate) THEN
doSomething();
If you are only interested in records that are in this range, use SETRANGE(dateField,myMinDate,myMaxDate) before the call to FINDFIRST.