GUYK Posted December 1, 2005 Posted December 1, 2005 I have a bunch of records with a date field. I want to get the value of the earliest date to use in a calculation but cannot see how I can find it. Can you help? Guy
LaRetta Posted December 2, 2005 Posted December 2, 2005 Hi Guy, You haven't given us much, but here's an example: Whether that date is in a related table, another file or within the SAME table, you can establish a relationship to it. This 'earliest date' will probably be the first date in the relationship. You can then simply specify in the calc, "Give me this first related record" and you are finished. Now, the question is ... what structure are we dealing with? One table? Two? Any existing relationships? Where does the date appear (in relation to the other dates within the table), etc. Example: If you have only ONE table, you can establish a cartesian join using the 'X' operator (which indicates all records are related to all records) from the table to itself. This is called a self-join. Then, if that date is the FIRST date, just specify the related date as SelfJoin::dateField in your calculation to grab that date. If the first record is NOT the first date you need, you can sort that self-join on the date field (or other fields) to MAKE it the first. Or make it the last, etc. There are many ways to accomplish what you wish. Once we know more about your structure and that date, and/or know the type of calculation you require, we can pin down precisely how to achieve it. LaRetta :wink2:
Recommended Posts
This topic is 6934 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now