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
|
|||
|
|||
calculating "how many" months
If I have 2 fields (DOB) and (service date) How woudl I calculate the
number of months between them? I need to use an access query to calculate that. I appreciate all the great people on thsi website! -- Buck |
#2
|
|||
|
|||
calculating "how many" months
On Mon, 19 Feb 2007 12:09:05 -0800, buckpeace wrote:
If I have 2 fields (DOB) and (service date) How woudl I calculate the number of months between them? I need to use an access query to calculate that. I appreciate all the great people on thsi website! DiffInMonthsateDiff("m",[DOB],[ServiceDate]) -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail |
#3
|
|||
|
|||
calculating "how many" months
buckpeace wrote:
If I have 2 fields (DOB) and (service date) How woudl I calculate the number of months between them? I need to use an access query to calculate that. Depends on what you mean by months. DateDiff("m", dob, servicedate) will tell you how many month boundaries are crossed (e.g. DateDiff("m", $1/31/07#, #2/1/07#) is 1 even though it's only one day). If you want the child's age in months at the service date, then use a variation of http://www.mvps.org/access/datetime/date0001.htm -- Marsh MVP [MS Access] |
#4
|
|||
|
|||
calculating "how many" months
Hi -
'correctly return number of whole months difference 'the (Day(dteEnd) Day(dteStart)) is a Boolean statement 'that returns -1 if true, 0 if false ? DateDiff("m", dteStart, dteEnd) + (Day(dteEnd) Day(dteStart)) Marshall Barton wrote: If I have 2 fields (DOB) and (service date) How woudl I calculate the number of months between them? I need to use an access query to calculate that. Depends on what you mean by months. DateDiff("m", dob, servicedate) will tell you how many month boundaries are crossed (e.g. DateDiff("m", $1/31/07#, #2/1/07#) is 1 even though it's only one day). If you want the child's age in months at the service date, then use a variation of http://www.mvps.org/access/datetime/date0001.htm -- Message posted via http://www.accessmonster.com |
Thread Tools | |
Display Modes | |
|
|