473,468 Members | 1,303 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to calculate payment due dates

3 New Member
I need help to calculate all the payment due dates for a hire purchase database. For example i got the invoice date to be 01/01/2014 and payment to be made Monthly upon 6 months.

So if the
Invoice_Date: 01/01/2014
Payment_Term: Monthly
No_of_Credit_Term: 6

I want to show all the payment due dates of 01/02/2014, 01/03/2014, 01/04/2014, 01/05/2014, 01/06/2014, 01/07/2014.
May 5 '14 #1
7 8985
jimatqsi
1,271 Recognized Expert Top Contributor
Priya06052014,
Welcome to Bytes.com. Your question lacks some important context. Do you need to do this calculation on a form, filling in boxes on the form after entering the known data? Or do you need to write a query to calculate these dates across an entire table of entries?

I can tell you this. The calculation of dates could be done using the DateAdd function. Something like this would work:
Expand|Select|Wrap|Line Numbers
  1. DateDue=DateAdd("m",1,InvoiceDate)
would give you DateDue=1 month past the invoice date.

You'll find it helpful to study the common date functions for Access
http://office.microsoft.com/en-us/ac...010131676.aspx

Also, since you may be new to Access, spend some time with the Northwind sample database for MS Access. You should be able to find it under the Help section of your Access program.

Jim
May 5 '14 #2
Priya06052014
3 New Member
Hey Jim

I will need the payment due dates to be shown on the Payment Form.The Payment Form will contain the invoice date(01/01/2014), Payment Term (Monthly) and No of credit term (6).
After which i need all the payment due dates to be shown in the Payment Form.
May 6 '14 #3
jimatqsi
1,271 Recognized Expert Top Contributor
Have you created the form? Has the form got an text box for each of these dates and other fields mentioned?

If you are just now making that form be sure to name each text box and other object carefully. Don't just accept the meaningless names Access gives each new object. Give them meaningful names so your code makes sense when it is read. something like
Expand|Select|Wrap|Line Numbers
  1. me.Paymen1Due_txt=DateAdd("m",1,me.InvoiceDate)
  2. me.Paymen2Due_txt=DateAdd("m",2,me.InvoiceDate)
  3. me.Paymen3Due_txt=DateAdd("m",3,me.InvoiceDate)
  4. me.Paymen4Due_txt=DateAdd("m",4,me.InvoiceDate)
  5. me.Paymen5Due_txt=DateAdd("m",5,me.InvoiceDate)
  6. me.Paymen6Due_txt=DateAdd("m",6,me.InvoiceDate)
  7.  
Jim
May 6 '14 #4
Priya06052014
3 New Member
I have a table named payment dates with fields name StartDate and EndDate. If the StartDate is 01/01/2014 and Enddate is 01/07/2014. Then in payment dates sql query how can I code to show all the month of 01/02/2014, 01/03/2014,01/04/2014,01/05/2014 and 01/06/2014.

Thanks
May 7 '14 #5
jimatqsi
1,271 Recognized Expert Top Contributor
You may find these built-in date functions helpful
Month(some date) returns the month of some date
Day(some date) returns the day of some date
Year(some date) returns the year of some date

So your query could test for month(StartDate)=1 or (Month(StartDate)=1 And Day(StartDate)<=7)

Search in Access Help for other functions. Take the time to explore.

Jim
May 7 '14 #6
zmbd
5,501 Recognized Expert Moderator Expert
First you have to be very careful here:
""I want to show all the payment due dates of 01/02/2014, 01/03/2014, 01/04/2014, 01/05/2014, 01/06/2014, 01/07/2014.""
I'm guessing that this is in dd/mm/yyyy format?
Remember that this site is global, my first thought was mm/dd/yyyy

Next do you want this on the form as below, in a table, or what?
Your statement ""Then in payment dates sql query how can I code to show all the month of 01/02/2014, "" is a bit open to interpretation.

NEXT

Access will ALWAYS refer internally to the date in #mm/dd/yyyy#
Pitfalls and Traps: International Dates in Access (allen browne)

FINALLY
You have a field with term = 6 months
and a field witht Enddate #07/01/2014#
Get rid of one or the other. I advise the [EndDate] as you already have the term in months, simply calculate the end date as needed.
May 7 '14 #7
NeoPa
32,556 Recognized Expert Moderator MVP
"Access will ALWAYS refer internally to the date in #mm/dd/yyyy#" -ZMBD.

By this, he means that any SQL reference will require literal dates to be stipulated in SQL standard format which is #m/d/y#. See Literal DateTimes and Their Delimiters (#) for more.
May 10 '14 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Guido | last post by:
How to cope with query output which provides all possible values based on a one to many relationship between two tables. I'm only interested in one answer per primary key in the 'one' table. I've...
0
by: Apple | last post by:
I need to create a form call "Receipt" that contain field to calculate payment - called " TotalPayment" = "PaymentFor" * "Period". In "PaymentFor", I suppose to use a combo box for 5 items...
3
by: cameron | last post by:
Hi I am new here in this forum: I am writing a C++ program to calculate a Montly Mortgage Payment where the loan amount is 200,000.00 with a 5.75% interest rate with a term of 30 years. My program...
0
by: 3skmult | last post by:
i wanna calculate the days beteween the two years ..
2
by: David | last post by:
Hi, I need to display 3 fields with future dates (Fridays only) as table column headers. i.e. 16th Feb | 23rd Feb | 2nd March. As each week passes, i.e. from the Saturday, the dates should...
0
by: rabraham | last post by:
I have a commission report I’m working on and it is causing to lose hair fast. I need help customizing this commission report. The current report has a couple conditions: Condition 1: Pay 2%...
1
by: Rajasekar09 | last post by:
hi am beginner of SQL , i hav some doubt in SQL Query Between Command.. i want to calculate two dates using between command.. example of the Query is: SELECT...
5
by: Jason7899 | last post by:
hi, any one know a software to list the dates of the next changes of the daylight for example: in next 24-10-2009 the hour will change for less hour thanks for your help :)
1
by: yappy77 | last post by:
My scenario: I have a date that a letter was sent. After 30 days, a second letter is sent and I need to include a 30-day due date in the letter from the date the second letter was generated or 60...
6
by: rmch | last post by:
Good Day.. Its my very first database project and I am really excited about it, trying to make for myself… I am an insurance manager and also learning access through free resources like training...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...
0
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
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
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
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
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 ...

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.