D
dmills
can someone help so that this code snippet works for a leap year in microsoft
access 2007?
DateAdd("m",-3,[enddate])
access 2007?
DateAdd("m",-3,[enddate])
can someone help so that this code snippet works for a leap year in microsoft
access 2007?
DateAdd("m",-3,[enddate])
fredg said:can someone help so that this code snippet works for a leap year in microsoft
access 2007?
DateAdd("m",-3,[enddate])
Did you place an = sign in front of the function:
=DateAdd("m",-3,[enddate])
It does work for leap years.
Using the debug window....
?DateAdd("m",-3,#3/1/2008#)
12/1/2007
?DateAdd("m",-3,#3/1/2009#)
12/1/2008
?DateAdd("m",-3,#5/1/2008#)
2/1/2008
?DateAdd("m",-3,#5/31/2009#)
2/28/2009
?DateAdd("m",-3,#5/31/2008#)
2/29/2008
What values do you think you should get?
What values were you getting?
when executing code for 4/30/2008 it always shows 03/30/2008 and never
3/31/2008
fredg said:can someone help so that this code snippet works for a leap year in microsoft
access 2007?
DateAdd("m",-3,[enddate])
Did you place an = sign in front of the function:
=DateAdd("m",-3,[enddate])
It does work for leap years.
Using the debug window....
?DateAdd("m",-3,#3/1/2008#)
12/1/2007
?DateAdd("m",-3,#3/1/2009#)
12/1/2008
?DateAdd("m",-3,#5/1/2008#)
2/1/2008
?DateAdd("m",-3,#5/31/2009#)
2/28/2009
?DateAdd("m",-3,#5/31/2008#)
2/29/2008
What values do you think you should get?
What values were you getting?
when executing code for 4/30/2008 it always shows 03/30/2008 and never
3/31/2008
dmills said:can someone help so that this code snippet works for a leap year in
microsoft
access 2007?
DateAdd("m",-3,[enddate])