Add 60 days to a date field

  • Thread starter Thread starter Cindy
  • Start date Start date
C

Cindy

I tried using the DateAdd function, I could not get it to
work. I want to take and existing date field and created
a calculated field that will add 60 days to the existing
date field.

Thanks in advance
 
I tried this, it does not work. Does the result field
need to be defined in the query before the statement is
placed in the criteria field?
-----Original Message-----
DateAdd('d', 60, [DateField])

should do it.

--
HTH
Van T. Dinh
MVP (Access)


I tried using the DateAdd function, I could not get it to
work. I want to take and existing date field and created
a calculated field that will add 60 days to the existing
date field.

Thanks in advance


.
 
I am not sure what you meant "in the criteria field"???

All you have to do is to define the calculated Field in the "Field" row of
an empty Column of the Query grid like:

DatePlus60: DateAdd('d', 60, [DateField])

replacing [DateField] with the proper field name in the Table you use as the
DataSource for the Query.

--
HTH
Van T. Dinh
MVP (Access)


I tried this, it does not work. Does the result field
need to be defined in the query before the statement is
placed in the criteria field?
-----Original Message-----
DateAdd('d', 60, [DateField])

should do it.

--
HTH
Van T. Dinh
MVP (Access)


I tried using the DateAdd function, I could not get it to
work. I want to take and existing date field and created
a calculated field that will add 60 days to the existing
date field.

Thanks in advance


.
 
Can't it just be [DateField]+60???

Herbert

Van T. Dinh said:
I am not sure what you meant "in the criteria field"???

All you have to do is to define the calculated Field in the "Field" row of
an empty Column of the Query grid like:

DatePlus60: DateAdd('d', 60, [DateField])

replacing [DateField] with the proper field name in the Table you use as the
DataSource for the Query.

--
HTH
Van T. Dinh
MVP (Access)


I tried this, it does not work. Does the result field
need to be defined in the query before the statement is
placed in the criteria field?
-----Original Message-----
DateAdd('d', 60, [DateField])

should do it.

--
HTH
Van T. Dinh
MVP (Access)


I tried using the DateAdd function, I could not get it to
work. I want to take and existing date field and created
a calculated field that will add 60 days to the existing
date field.

Thanks in advance


.
 
Thank you, that is what I needed, it worked.

Van T. Dinh said:
I am not sure what you meant "in the criteria field"???

All you have to do is to define the calculated Field in the "Field" row of
an empty Column of the Query grid like:

DatePlus60: DateAdd('d', 60, [DateField])

replacing [DateField] with the proper field name in the Table you use as the
DataSource for the Query.

--
HTH
Van T. Dinh
MVP (Access)


I tried this, it does not work. Does the result field
need to be defined in the query before the statement is
placed in the criteria field?
-----Original Message-----
DateAdd('d', 60, [DateField])

should do it.

--
HTH
Van T. Dinh
MVP (Access)


I tried using the DateAdd function, I could not get it to
work. I want to take and existing date field and created
a calculated field that will add 60 days to the existing
date field.

Thanks in advance


.
 
Yes. However, DateAdd is the more "official" method. Personally, I
consider DateAdd more syntactically correct also, since algebraic
additions/subtractions of time can give incorrect results in _some_
circunstances while using DateAdd always give correct results.
 
Back
Top