Generating dates

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello, I would like a query to produce a date that is six months ahead, minus
one day. For example, today is November 26 2004 and I would like my query to
generate the date May 25 2005. In Excel I would take today's date and apply
the formula =DATE(YEAR(A1),MONTH(A1)+6,DAY(A1)-1), but I don't know how to
achieve this in Access. I have tried using DateAdd, but without success. Any
help would be greatly appreciated.

Tim Long
 
Thanks, much appreciated!

Duane Hookom said:
Try:
=DateSerial(YEAR([A1]),MONTH([A1])+6,DAY([A1])-1),


--
Duane Hookom
MS Access MVP
--

Tim Long said:
Hello, I would like a query to produce a date that is six months ahead,
minus
one day. For example, today is November 26 2004 and I would like my query
to
generate the date May 25 2005. In Excel I would take today's date and
apply
the formula =DATE(YEAR(A1),MONTH(A1)+6,DAY(A1)-1), but I don't know how to
achieve this in Access. I have tried using DateAdd, but without success.
Any
help would be greatly appreciated.

Tim Long
 
Back
Top