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

Automatically changing dates

P: n/a
SJH
I currently have reports (mostly graphs) that utilize dates entered into a
form. The dates are pretty baisc from the standpoint of the start and end
of the current fiscal year, the start and end of last fiscal year, previous
month start and end dates, etc.

My users would like to enter one set of dates (preferably the previous month
start and end) and have all other dates update from there without extra
input.

I have the fiscal years taken care of. That was pretty simple, same start
and end date, different year.

I am using text boxes with the following information:
=DateAdd("m", -1[End of Previous Month])

The problem is when I have a date such as April 30, 2003. I get March 30,
2003 as a result. What do I need to do differently to get March 31, as an
end date?

I am pretty new to prgramming and sometimes get stuck on what seems like a
minor problem. Any help would be appreciated.
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

To get previous month's end-date (in debug window):

? #4/30/03# - Day(#4/30/03#)
3/31/2003

Saw this on this newsgroup within the last few days (Larry or Lyle
solution, I believe).

MGFoster:::mgf
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP5jFsIechKqOuFEgEQIv+wCgtXuV5jEt8M7xO9MQTRFa0G vBd2YAoP+h
ccvHyx8P5RN3fDigeHKQDjcS
=wG5y
-----END PGP SIGNATURE-----
SJH wrote:
I currently have reports (mostly graphs) that utilize dates entered into a
form. The dates are pretty baisc from the standpoint of the start and end
of the current fiscal year, the start and end of last fiscal year, previous
month start and end dates, etc.

My users would like to enter one set of dates (preferably the previous month
start and end) and have all other dates update from there without extra
input.

I have the fiscal years taken care of. That was pretty simple, same start
and end date, different year.

I am using text boxes with the following information:
=DateAdd("m", -1[End of Previous Month])

The problem is when I have a date such as April 30, 2003. I get March 30,
2003 as a result. What do I need to do differently to get March 31, as an
end date?

I am pretty new to prgramming and sometimes get stuck on what seems like a
minor problem. Any help would be appreciated.


Nov 12 '05 #2

P: n/a
Look at the DateSerial function in help. There is an example that shows you
how to compute the number of days in a month.

"SJH" <12*****@wwt.net(remove first two)> wrote in message
news:VG****************@reggie.win.bright.net...
I currently have reports (mostly graphs) that utilize dates entered into a
form. The dates are pretty baisc from the standpoint of the start and end
of the current fiscal year, the start and end of last fiscal year, previous month start and end dates, etc.

My users would like to enter one set of dates (preferably the previous month start and end) and have all other dates update from there without extra
input.

I have the fiscal years taken care of. That was pretty simple, same start
and end date, different year.

I am using text boxes with the following information:
=DateAdd("m", -1[End of Previous Month])

The problem is when I have a date such as April 30, 2003. I get March 30,
2003 as a result. What do I need to do differently to get March 31, as an
end date?

I am pretty new to prgramming and sometimes get stuck on what seems like a
minor problem. Any help would be appreciated.

Nov 12 '05 #3

P: n/a
SJH
Thanks for the help. Worked like a charm.

"MGFoster" <me@privacy.com> wrote in message
news:EA*****************@newsread3.news.pas.earthl ink.net...
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

To get previous month's end-date (in debug window):

? #4/30/03# - Day(#4/30/03#)
3/31/2003

Saw this on this newsgroup within the last few days (Larry or Lyle
solution, I believe).

MGFoster:::mgf
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP5jFsIechKqOuFEgEQIv+wCgtXuV5jEt8M7xO9MQTRFa0G vBd2YAoP+h
ccvHyx8P5RN3fDigeHKQDjcS
=wG5y
-----END PGP SIGNATURE-----
SJH wrote:
I currently have reports (mostly graphs) that utilize dates entered into a form. The dates are pretty baisc from the standpoint of the start and end of the current fiscal year, the start and end of last fiscal year, previous month start and end dates, etc.

My users would like to enter one set of dates (preferably the previous month start and end) and have all other dates update from there without extra
input.

I have the fiscal years taken care of. That was pretty simple, same start and end date, different year.

I am using text boxes with the following information:
=DateAdd("m", -1[End of Previous Month])

The problem is when I have a date such as April 30, 2003. I get March 30, 2003 as a result. What do I need to do differently to get March 31, as an end date?

I am pretty new to prgramming and sometimes get stuck on what seems like a minor problem. Any help would be appreciated.

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.