473,803 Members | 2,972 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(DateSer ial(year(Date() etc but I can't figure it out. Thanks,

--
Message posted via http://www.accessmonster.com
Mar 28 '06 #1
2 6787
"smcgrath via AccessMonster.c om" <u10749@uwe> wrote in message
news:5df0b1bb19 a5d@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(DateSer ial(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.c om 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(DateSer ial(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
9252
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" * 60 * 60 * 24 .. but It is a headache for me to find the No_of_days_for_a_month... in DB2 Thanks very much! Henry
6
3018
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 project that requires updating data every month. A typical examle is an apartment rental software but could be applied
6
8993
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 between date and datetime classes? Please, help
7
1856
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) allowed is 1 month. However, I want to be able to reduce the minimum amount of time to 1 day (i.e. 24 hours) -- basically a 24 hour trial period. Can somebody PLEASE PLEASE tell me what I need to change in this file to do this? Here is a...
6
4840
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 selected. Also, please let me know how I can keep a copy of invoices which I generate for future reference. Awaiting eagerly for your replies -- 'With Thanks'
0
1906
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 dates only, this code is intended to use more thrifty event descriptions (3rd saturday, last tuesday, etc.) as well as traditional one-of dates. The core here here is quite spartan, no table logic or or db cruft included (I figure you have our own...
7
3830
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 same days etc.) Instate of correct days. Here is my code from 3 files. *************************************************************************************** calendr.js file: isIE = (document.all ? true : false); isDOM =...
5
19825
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 monthDifference(DateTime startDate, DateTime endDate) { int monthsApart = 12 * (startDate.Year - endDate.Year) +
0
2366
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 ASP.NET a DataGrid with Updatable rows based on a date retrieved from a data table in SQL Server. Below is the design algorithm. 1. Retrieve the Max(rundate) From MyDataTable 2. If the current month -1 = rundate .month from step 1 then 2a. ...
0
9703
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9565
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10317
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
10295
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
10069
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...
1
7604
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
6844
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
5501
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3799
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.