Hello all
A beautiful day for all
I have a query looking for the expiration of substance
Used this expression, but to no avail
Between Date () And DateAdd ("m"; 1; 2; 3; 4; 5; 6; Date ())
What I want is the account 6 months down
Hello all
A beautiful day for all
I have a query looking for the expiration of substance
Used this expression, but to no avail
Between Date () And DateAdd ("m"; 1; 2; 3; 4; 5; 6; Date ())
What I want is the account 6 months down
DateAdd only has 3 arguments (see: http://www.techonthenet.com/access/f...te/dateadd.php)
Try:
(assuming your version uses semi-colons as argument separators instead of commas).Code:Between Date() And DateAdd("m";6;Date())
Thank you JoeM
But here, if exceeded 6 months does not appear
Between Date () And DateAdd ("m"; 6; Date ())
I want to continue to make history at the stage finish
I do not understand what you are asking.
I thought you were looking for any records that expired within the next 6 months (which is why you would use BETWEEN in the first place).
I do not understand what this means:
I want to continue to make history at the stage finish
I think we may be running into a language barrier (I do not know when "Finished into force" means).
The two records you highlighted in blue would not be returned, as they expired prior to today's date. If you want to include records that already expired, then you do not want to use BETWEEN, but rather:
which would include all records that expire anytime prior to 6 months from today. So that would include all past records, and only the future records that are less than (or equal to) 6 months out.Code:<= DateAdd("m";6;Date())
If that is not what you are after, perhaps you could walk us through the 6 sample records you posted, and indicate whether or not each one should be returned by your query, and explain the reason why.
That might go a long way in explaining what it is you are trying to do and why.
Probably going to have to extract the month, day, and year as text and reconfigure as American date standard before using Date() functions.
Why would that be?Probably going to have to extract the month, day, and year as text and reconfigure as American date standard before using Date() functions.
If they are using a non-American version, wouldn't that already both extend to their use of functions and date formats?
I wouldn't think that would be necessary, as long as the data they are running this against is stored as Date/Time data-type (and not text).
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Thank you JoeM , Thank you June![]()