473,419 Members | 1,964 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

End of month date calculation

I have a table listing accounts with a closed date - our Trial balance drops
the account after 7 days but our database keeps the record forever - How do I
calculate the end of month less 7 days so that I can get an actual count of
the accounts that were closed during the month. I believe that the
calculation involves
Between(DateSerial(year(Date() etc but I can't figure it out. Thanks,

--
Message posted via http://www.accessmonster.com
Mar 28 '06 #1
2 6763
"smcgrath via AccessMonster.com" <u10749@uwe> wrote in message
news:5df0b1bb19a5d@uwe...
I have a table listing accounts with a closed date - our Trial balance drops the account after 7 days but our database keeps the record forever - How do I calculate the end of month less 7 days so that I can get an actual count of the accounts that were closed during the month. I believe that the
calculation involves
Between(DateSerial(year(Date() etc but I can't figure it out. Thanks,

--
Message posted via http://www.accessmonster.com


This "quickie" may help,

Last day of previous month =
Date() - Day(Date())

Fred Zuckerman
Mar 28 '06 #2
smcgrath via AccessMonster.com wrote:
I have a table listing accounts with a closed date - our Trial
balance drops the account after 7 days but our database keeps the
record forever - How do I calculate the end of month less 7 days so
that I can get an actual count of the accounts that were closed
during the month. I believe that the calculation involves
Between(DateSerial(year(Date() etc but I can't figure it out. Thanks,


End of month minus 7 days would be...

DateAdd("d", -7, DateSerial(Year(Date()), Month(Date())+1, 0))

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Mar 28 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: kaming | last post by:
Dear all, Do any one have idea how to obtain the exactly number of seconds in a month with given month and year using DB2 given functions? The formula is as simple as "No_of_days_for_a_month" *...
6
by: Hasanain F. Esmail | last post by:
Hi all, I sincerly thank you all in advance for your help to solve this problem. I have been trying to find a solution to this problem for sometime now but have failed. I am working on a...
6
by: Ante Perkovic | last post by:
Hi, How to declare datetime object and set it to my birthday, first or last day of this month or any other date. I can't find any examples in VS.NET help! BTW, what is the difference...
7
by: Novice Computer User | last post by:
Hi. Can somebody PLEASE help. I have spent hours on this.. but I am a total novice and can't seem to figure it out. Here is a .php script. Right now, the minimum amount of time (i.e. duration)...
6
by: Burghew | last post by:
Hello, I generate invoices for my customers evry month. I want to keep a form which will allow the user to select the Month and Year through a combo and thus generate reports based on the month...
0
by: larry | last post by:
I am in the process of rewriting one of my first PHP scripts, an event calendar, and wanted to share the code that is the core of the new calendar. My current/previous calendar processed data...
7
by: ajaydesai | last post by:
I have JavaScript code to dispaly two month calendar days at a time, but i have a problem both month that disaplay at a time have same days (for example May and June has same days, June and July have...
5
by: Mike | last post by:
I use c#, V2005 How I can get difference between two dates and get value in month(s) I had found some solutions but it is not exactly what I need. private static int...
0
by: marlberg | last post by:
Platform: Windows2000, WindowsXP, Windows Vista, etc Language: C#, ASP.NET Pre-compiled Libraries: Enterprise Library 3.0 full I have a requirement to implement in and display in C# and...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
1
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...
0
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...
0
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,...
0
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...

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.