Change Date of Query Results to a new date

tyjan10

New member
Local time
Yesterday, 22:07
Joined
Dec 8, 2012
Messages
6
Is it possible to run a Query based on another Query and change all the dates of the Query Result that are outside a Date() -365 days or a Date() + 365. to the Date() -365? I only want those dates to change but keep the others. I use [Start Date] and [End Date] in my table. Thanks.
 
Is it possible to run a Query based on another Query and change all the dates of the Query Result that are outside a Date() -365 days or a Date() + 365. to the Date() -365? I only want those dates to change but keep the others. I use [Start Date] and [End Date] in my table. Thanks.
You can use an update query with an If Statement.
If Result Outside then change the result Else do Nothing. You need to write the appropriate Statement.
However in the question you have created a loop by placing all unwanted Results into the same Value you class as unwanted.
Namely if outside - 365 make it -365. So tomorrow all these dates that you just changed need changing again.
I could have misunderstood so please have another look and get back to me.
BTW do you want this Result written to the table or just for display. If it is just for then display then don't use an update query, you just need the If statement.
Can you work it out from her or do you need help writing the Statement. If you do then please supply the actual field names.
 

Users who are viewing this thread

Back
Top Bottom