By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,847 Members | 3,102 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,847 IT Pros & Developers. It's quick & easy.

calculate end date from start date

P: 2
Hi Everyone,

I would like to create an [end date] from the [start date]in ms access form.
The formula is simple :([start date] + 3month) - (day of the start date-1day)

for example:
a.) if the start date is 01.01.2011 than the end date will be 03.31.2011 or

b.) if the start date is 15.02.2011 than the end date will be 14.05.2011

I've tried with this DateSerial(Year([start date]);Month([start date])+3;0)
but I stucked because anytime I got the last day of the month.
Pls help me, thanks in advance.
Dec 14 '11 #1

✓ answered by sierra7

Hi,
Try
Expand|Select|Wrap|Line Numbers
  1. Me!txtFinish = DateAdd("d", -1, DateAdd("m", 3, Me!txtStart))
I'm not sure whether you are using UK or US date formats. (a) seems to be US and (b) UK, but the function should pick up your system settings.

S7

Share this Question
Share on Google+
2 Replies


Expert 100+
P: 446
Hi,
Try
Expand|Select|Wrap|Line Numbers
  1. Me!txtFinish = DateAdd("d", -1, DateAdd("m", 3, Me!txtStart))
I'm not sure whether you are using UK or US date formats. (a) seems to be US and (b) UK, but the function should pick up your system settings.

S7
Dec 14 '11 #2

P: 2
Hi Sierra7

It's absolutely PERFECT !!!
Thank you very much.
Dec 14 '11 #3

Post your reply

Sign in to post your reply or Sign up for a free account.