ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I query a future date? (https://www.excelbanter.com/excel-worksheet-functions/68525-how-do-i-query-future-date.html)

Ralph 47

How do I query a future date?
 
In Excel 2003, I calculate a future date for prescription refill dates based
on one day less than NbrWeeksTillRefill weeks using the following expression.

RefillDateCalc: DateSerial(Year([tbl Prescriptions]![BeginDate]),Month([tbl
Prescriptions]![BeginDate]),Day([tbl Prescriptions]![BeginDate])+[tbl
Prescriptions]![NbrWeeksTillRefill]*7-1)

That works fine, but when I try to query it I get a data type mismatch error
with a date, text or number. Excel seems to recognize it as a date and will
format it as a date any way I wish. I created another field equal to this
field, and can query it using the expression Between [Beginnng Date] and
[Ending Date], but it asks for the parameter value of RefillDateCalc and
returns no results.


All times are GMT +1. The time now is 11:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com