473,503 Members | 1,692 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Automatically changing dates

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
3 2446
-----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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2431
by: Hee sejou | last post by:
Hi, I want to create a webpage with a jpg file whose hue value can automatically change when we browse it. Any one can help with the code? Thanks.
31
5659
by: Arthur Shapiro | last post by:
I'm the webmaster for a recreational organization. As part of one page of the site, I have an HTML "Calendar at a Glance" of the organization's events for the month. It's a simple table of a...
14
10268
by: tvmadarsh | last post by:
hai i am a System Administrator in a company. my most of the PCs system date when starting changes automatically to the year 2005. it is big problem for me now please any one help me to solve...
1
1305
by: John | last post by:
I made an Access application that helps with the financial administration of a company. It imports downloaded files from a bank. For the download the user has to enter the start and end date on a...
5
2050
by: tx9271 | last post by:
I am trying to make link but Dreamweaver keeps automatically changing them on me the second I click away!! I am trying to link to specific pages and this is really messing everything up. ...
0
7273
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,...
0
7322
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5572
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5000
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4667
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3161
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3150
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
374
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.