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
|
|||
|
|||
# of days between two dates
Is there an expression that I can use in a query to determine the
number of days between two dates? |
#2
|
|||
|
|||
# of days between two dates
DateDiff("d",earlydate, laterdate)
You might also be able to simply subtract one from the other. -- Duane Hookom Microsoft Access MVP "Jim" wrote: Is there an expression that I can use in a query to determine the number of days between two dates? |
#3
|
|||
|
|||
# of days between two dates
On Fri, 21 Aug 2009 09:47:02 -0700 (PDT), Jim wrote:
Is there an expression that I can use in a query to determine the number of days between two dates? DateDiff("d", [first date field], [second date field]) That's inclusive of the first date and the last date. -- John W. Vinson [MVP] |
#4
|
|||
|
|||
# of days between two dates
Hello Jim
Try to use the DateDiff function. In a new saved query, in the design mode, right click a next empty column and choose "Built" (I think this is the option in English version.). In the Internal Functions, find DATEDIFF end fill up the fields. By. Joe "Jim" escreveu na mensagem ... Is there an expression that I can use in a query to determine the number of days between two dates? |
#5
|
|||
|
|||
# of days between two dates
Juzer Jim napisal
| Is there an expression that I can use in a query to determine the | number of days between two dates? You can use DateDiff() function, as mentioned earlier, but... remember that dates are just numbers od days from "zero" date (in access: 1899-12-30) So you can just subtract them: xDays = Date2 - Date1 or xDays = Int(DateTime2) - Int(DateTime1) -- KN |
Thread Tools | |
Display Modes | |
|
|