If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Date Diff Questions
How can I make a date calc based on the users input?
For example: If the user enters 11/01/09 on the end EndDate the BeginDate would be 10/31/08. If the user enters 11/30/09 on the EndDate the BeginDate would be 11/01/09. I currently have the following formula but its not working properly b/c of the example provided above. It always captures 11/01/08. =DateAdd("m",-12,[txtEndDate]) Any help would be good :-) |
#2
|
|||
|
|||
Date Diff Questions
You posted in a newsgroup supporting MS Access and forms. Is that where you
are trying to do this? Are your controls ([EndDate], [BeginDate]) unbound or bound to some underlying table? Where do you have that formula? How does Access know it's supposed to do (?re-do) the calculation? More info, please... Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or psuedocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "Joe" wrote in message ... How can I make a date calc based on the users input? For example: If the user enters 11/01/09 on the end EndDate the BeginDate would be 10/31/08. If the user enters 11/30/09 on the EndDate the BeginDate would be 11/01/09. I currently have the following formula but its not working properly b/c of the example provided above. It always captures 11/01/08. =DateAdd("m",-12,[txtEndDate]) Any help would be good :-) |
#3
|
|||
|
|||
Date Diff Questions
I don't have a grasp of your business rules.
Why does 11/01/09 get 10/31/08 (one year and one day prior), but 11/30/09 gets 11/01/08, on year and 29 days prior. "Joe" wrote: How can I make a date calc based on the users input? For example: If the user enters 11/01/09 on the end EndDate the BeginDate would be 10/31/08. If the user enters 11/30/09 on the EndDate the BeginDate would be 11/01/09. I currently have the following formula but its not working properly b/c of the example provided above. It always captures 11/01/08. =DateAdd("m",-12,[txtEndDate]) Any help would be good :-) |
Thread Tools | |
Display Modes | |
|
|