A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

add an integer to Date the get Date?



 
 
Thread Tools Display Modes
  #1  
Old July 14th, 2004, 06:27 PM
aa
external usenet poster
 
Posts: n/a
Default add an integer to Date the get Date?

I have a table "Invoices" containing, among other things, the date of the
invoice, as type Date
I have another table "Customers" containing, among other things, the credit
terms for each customer (like 30 days, 60 days etc) as type Integer.

How do I build a query to show the invoice payment due date, i.e. how do I
add an integer to Date the get Date?


  #2  
Old July 14th, 2004, 07:04 PM
Roger Carlson
external usenet poster
 
Posts: n/a
Default add an integer to Date the get Date?

Simply add it to the date. A date is stored internally as a Double
precision number, so you should just be able to do:
DueDate: InvoiceDate + 30
You can also use the DateAdd funtion:
DueDate: DateAdd("d", 30, InvoiceDate)

The nice thing about DateAdd is that you can add days or weeks, or months,
or quarters, or a whole bunch of other intervals. But there is no real
advantage when using days.

--
--Roger Carlson
www.rogersaccesslibrary.com
Reply to: Roger dot Carlson at Spectrum-Health dot Org

"aa" wrote in message
...
I have a table "Invoices" containing, among other things, the date of the
invoice, as type Date
I have another table "Customers" containing, among other things, the

credit
terms for each customer (like 30 days, 60 days etc) as type Integer.

How do I build a query to show the invoice payment due date, i.e. how do I
add an integer to Date the get Date?




  #3  
Old July 14th, 2004, 07:09 PM
BerHav
external usenet poster
 
Posts: n/a
Default add an integer to Date the get Date?

Hi,

This is sooo simple ;-) Add the credit term to the invoice date.
Just create a query and link both tables through the existing CustomerID - what I expect there is or any other unique identifier.

Create in your query an additional column like DueDate : InvoiceDate + CreditTerm

This works as Dates are nothing other than numbers for Access, Day 1 = 01/Jan/1900. Decimals are the hours, minutes and seconds. E.g. 0.5 = 12:00, 0.25 = 6:00 a.m.

--
HTH
Bernd


"aa" wrote:

I have a table "Invoices" containing, among other things, the date of the
invoice, as type Date
I have another table "Customers" containing, among other things, the credit
terms for each customer (like 30 days, 60 days etc) as type Integer.

How do I build a query to show the invoice payment due date, i.e. how do I
add an integer to Date the get Date?



  #4  
Old July 14th, 2004, 08:01 PM
aa
external usenet poster
 
Posts: n/a
Default Thank you very much

Thank you very much


  #5  
Old July 15th, 2004, 12:51 PM
Douglas J. Steele
external usenet poster
 
Posts: n/a
Default add an integer to Date the get Date?

"BerHav" wrote in message
...
This works as Dates are nothing other than numbers for Access, Day 1 =

01/Jan/1900.

pedantic
Actually, Day 1 is 31 Dec, 1899. This is because Microsoft decided to
perpetuate an error made in Lotus 1-2-3 to make conversion simpler when they
produced Excel, and they had to keep it to simplify inter-application
operability.
/pedantic

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)




  #6  
Old July 15th, 2004, 09:54 PM
BerHav
external usenet poster
 
Posts: n/a
Default add an integer to Date the get Date?

Hey,

come on :-)

Bernd
  #7  
Old July 23rd, 2004, 04:18 AM
EDUARDO PICCINI
external usenet poster
 
Posts: n/a
Default add an integer to Date the get Date?


"aa" escreveu na mensagem
...
I have a table "Invoices" containing, among other things, the date of the
invoice, as type Date
I have another table "Customers" containing, among other things, the

credit
terms for each customer (like 30 days, 60 days etc) as type Integer.

How do I build a query to show the invoice payment due date, i.e. how do I
add an integer to Date the get Date?




  #8  
Old July 23rd, 2004, 05:32 AM
Tom Ellison
external usenet poster
 
Posts: n/a
Default add an integer to Date the get Date?

Dear Eduardo:

Please refer to the DateAdd function in online help or your favorite
printed reference. This has just what you need.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts


On Fri, 23 Jul 2004 00:18:06 -0300, "EDUARDO PICCINI"
wrote:


"aa" escreveu na mensagem
...
I have a table "Invoices" containing, among other things, the date of the
invoice, as type Date
I have another table "Customers" containing, among other things, the

credit
terms for each customer (like 30 days, 60 days etc) as type Integer.

How do I build a query to show the invoice payment due date, i.e. how do I
add an integer to Date the get Date?




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Date Dilema! Kagsy General Discussion 8 July 13th, 2004 03:45 AM
re Easterdate Steved Worksheet Functions 16 July 12th, 2004 10:44 PM
Stopping word from changing the document date Mike New Users 2 May 22nd, 2004 11:45 PM
Formatting dates in Excel bernrunner15 New Users 4 May 11th, 2004 10:32 PM
Does date fall between two ranges? MR Worksheet Functions 4 January 14th, 2004 04:08 PM


All times are GMT +1. The time now is 09:08 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.