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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
Thank you very much
Thank you very much
|
#5
|
|||
|
|||
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
|
|||
|
|||
add an integer to Date the get Date?
Hey,
come on :-) Bernd |
#7
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |