473,385 Members | 1,908 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

calculate end date from start date

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

2 3881
sierra7
446 Expert 256MB
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
Hi Sierra7

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

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

Similar topics

3
by: David Kuhn | last post by:
I have a query with a date field criteria of: Between And When the query is run, I am asked for the Start date and then the End Date. So far, so good. The records returned are all those in...
8
by: TJS | last post by:
what namespaces are required so I can do a simple calculate age from date of birth ?
6
by: rohayre | last post by:
Im a long time java developer and actually have never done anything with java scripting. I'd like to write a short simple script for calculating a date in the future based on today's date and a...
29
by: Santiagoa | last post by:
If I set up a task table with an Date_assigned and a number of days to complete the task I calculate the end_date field by using the code below I found in this forum How ever when I enter the...
1
by: Del | last post by:
I have a parameter query that requires the user to enter a Start Date: and End Date: and pull data between that date range. I am currently using the following parameter; Select * From mytable...
0
by: =?Utf-8?B?QW5pdGhh?= | last post by:
Hi, Currently for Announcement library a custom column "publish start date" is added and under the search result webpart changed the xslt by filtering the result based on the publish start date...
1
by: ShwetaJain | last post by:
Hi... I am able to get the type of the message as IPM.Appointmnet in the inbox but i am unable to get the due date, start date, for that appointment.... I am using MAPI in exchange server but i...
3
by: Jared Elyea | last post by:
I had no experience in VB before writing this so bare with me... the function below seems to work for certain cases, but not all (in some cases it is a week behind). Can anybody help me figure this...
1
by: vasavivenu | last post by:
Hi, I need to calculate the Expire Date by adding of days/months in c#. For Example: I give present date as 08-03-2011, and i gave period of time as 3 months then i need the 09-06-2011. ...
1
by: divya birla | last post by:
Posted - 03/29/2011 : 06:34:20 I have a table which contain Topic, Sequence number and no of turns. User input the Single Start date and on the basis of which series of start date and end...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.