473,797 Members | 3,212 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 2459
-----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/AwUBP5jFsIechKq OuFEgEQIv+wCgtX uV5jEt8M7xO9MQT RFa0GvBd2YAoP+h
ccvHyx8P5RN3fDi geHKQDjcS
=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.ne t(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******** *********@newsr ead3.news.pas.e arthlink.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/AwUBP5jFsIechKq OuFEgEQIv+wCgtX uV5jEt8M7xO9MQT RFa0GvBd2YAoP+h
ccvHyx8P5RN3fDi geHKQDjcS
=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
2444
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
5728
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 calendar, 7 across by whatever needed down, and I manually create it each month - not a big deal. Every day I go in and darken the background color of the current day's cell by changing the appropriate <TD> entry to <TD bgcolor="c63800"> and...
14
10288
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 this problem. i have checked with almost with all antivirus also. Adarsh
1
1330
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 website. Now I would like the user to be able to press a button in the Access application so that the website gets focus and the dates on that website are entered automatically. Is this possible? Can Access interact with Internet Explorer? How...
5
2060
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. Dreamweaver is changing my "%26" to "&" signs. I don't want this. I need the %26 to be where the & are. Anyone know what's going on?
0
10246
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10209
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10023
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9066
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7560
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6803
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4135
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3750
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.