Re: No of months and days between 2 dates
From: rgrantz (r_grantz_at_hotmail.com)
Date: 11/01/04
- Next message: John Vinson: "Re: crosstab query by week"
- Previous message: MaryW: "Re: How do I retrieve the median value of a field?"
- In reply to: Lance: "No of months and days between 2 dates"
- Next in thread: ChrisJ: "RE: No of months and days between 2 dates"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 1 Nov 2004 14:56:21 -0800
This seems like it would be very difficult to do because of the difference
in days that months have; it's kind of a variable depending on which month
you call a month and which month you'd call 1/2 a month, etc. If you were
averaging 30 or 31 days, though, you could just use DateDiff divided by 30
or 31, and set the format to round however you wish. I've never used
DateDif, I've always used [Date2]-[Date1], and in this case I'd use
([Date2]-[Date1])/30 (this is assuming Date2 is always after Date1, of
course, maybe DateDiff takes that whole issue into account).
But if you're at February 20, and the second date is April 13, it's kind
of a matter of opinion as to exactly how many months that is.
"Lance" <lance_cus@yahoo.com> wrote in message
news:e%23RvOtDwEHA.2016@TK2MSFTNGP15.phx.gbl...
> hi all,
> I need to calculate the number of months in between 2 dates and want to
> display as "x months and y days" format. I tried using datediff, but it
> gives as whole number. Hope someone can help me with this.
> Thanks in advance.
- Next message: John Vinson: "Re: crosstab query by week"
- Previous message: MaryW: "Re: How do I retrieve the median value of a field?"
- In reply to: Lance: "No of months and days between 2 dates"
- Next in thread: ChrisJ: "RE: No of months and days between 2 dates"
- Messages sorted by: [ date ] [ thread ]