Ask the user what defines a month! It could be 30 days or
gomonth(date, 1) or...
You might want to code this as an option selectable by the user.
On Thu, Jul 26, 2012 at 4:38 AM, MB Software Solutions, LLC
mbsoftwaresoluti...@mbsoftwaresolutions.com wrote:
Input is 2 dates...I need to count the
Hey,
I do something like this for a hiring company when working out overhire
extension invoices. Some of them I have to work out weeks and others get
calculated in months.
I use this and it works for me. They don't have anything more than 2 years
old (famous last words...) that need extending
Input is 2 dates...I need to count the number of months between (and
including) them. example: 2012-02-27 to 2013-01-31 would be 13.
Thought this might yield some interesting approaches. :-)
--
Mike Babcock, MCP
MB Software Solutions, LLC
President, Chief Software Architect
What constitutes a month? Is 2012-06-30 to 2012-07-01 one month or two?
And how would your example be 13?
Fred
On Wed, Jul 25, 2012 at 1:38 PM, MB Software Solutions, LLC
mbsoftwaresoluti...@mbsoftwaresolutions.com wrote:
Input is 2 dates...I need to count the number of months between (and
On 7/25/2012 4:45 PM, Fred Taylor wrote:
What constitutes a month? Is 2012-06-30 to 2012-07-01 one month or two?
And how would your example be 13?
Hi Fred,
Sorry...forgot to say disregard the day in the month. Here's what I
came up with. It's a bit verbose but it's for clarity's sake:
On 7/25/2012 4:45 PM, Fred Taylor wrote:
What constitutes a month? Is 2012-06-30 to 2012-07-01 one month or two?
And how would your example be 13?
Fred
On Wed, Jul 25, 2012 at 1:38 PM, MB Software Solutions, LLC
mbsoftwaresoluti...@mbsoftwaresolutions.com wrote:
Input is 2 dates...I
Hi Mike,
Can't you just do:
dDate1 = {27/02/2012}
dDate2 = {31/01/2013}
nMonths = (Year(dDate2)*12 + Month(dDate2)) - (Year(dDate1)*12 +
Month(dDate1)) + 1
Paul
On 25 July 2012 21:57, MB Software Solutions, LLC
mbsoftwaresoluti...@mbsoftwaresolutions.com wrote:
On 7/25/2012 4:45 PM, Fred
LOCAL m.d1, m.d2, m.nMons
m.d1 = {^2012/02/27}
m.d2 = {^2013/01/31}
m.d1 = {^2012/06/30}
m.d2 = {^2012/07/01}
m.nMons = MonthRange(m.d1, m.d2)
? m.nMons
FUNCTION MonthRange(m.tdFrom, m.tdTo)
LOCAL m.nM, m.dTest, m.dEnd
m.nM = 0
m.dTest = m.tdFrom - DAY(m.tdFrom) + 1 1st of the begin month
m.dEnd
I never reply to this kind of email because I leave it to you gurus
However, I was just working with a live system where I use this formula
today=date()
m1=(year(trans.date)*12)+month(trans.date)
m2=(year(today)*12)+month(today)
lvMonths=m2-m1
On Thu, Jul 26, 2012 at 9:20 AM, Fred Taylor
On 25 July 2012 22:26, Sytze de Boer sytze.k...@gmail.com wrote:
I never reply to this kind of email because I leave it to you gurus
However, I was just working with a live system where I use this formula
today=date()
m1=(year(trans.date)*12)+month(trans.date)
On 7/25/2012 5:31 PM, Paul Hill wrote:
On 25 July 2012 22:26, Sytze de Boer sytze.k...@gmail.com wrote:
I never reply to this kind of email because I leave it to you gurus
However, I was just working with a live system where I use this formula
today=date()
On Wed, Jul 25, 2012 at 4:41 PM, MB Software Solutions, LLC
mbsoftwaresoluti...@mbsoftwaresolutions.com wrote:
On 7/25/2012 5:31 PM, Paul Hill wrote:
On 25 July 2012 22:26, Sytze de Boer sytze.k...@gmail.com wrote:
I never reply to this kind of email because I leave it to you gurus
However, I
Here, one less multiply by 12:
?(YEAR(m.d2)-YEAR(m.d1))*12 + MONTH(m.d2)-MONTH(m.d1)+1
Fred
On Wed, Jul 25, 2012 at 2:41 PM, MB Software Solutions, LLC
mbsoftwaresoluti...@mbsoftwaresolutions.com wrote:
On 7/25/2012 5:31 PM, Paul Hill wrote:
On 25 July 2012 22:26, Sytze de Boer
13 matches
Mail list logo