Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Date1 = "01/01/2004"
Date2 = "21/12/2005"
M = Split(Date1,"/")(1) - Split(Date2,"/")(1)
D = Split(Date1,"/")(0) - Split(Date2,"/")(0)
Y = Split(Date1,"/")(2) - Split(Date2,"/")(2)
Y = Y * 12
D = D / Abs(D)
M = Abs(M + D + Y)
01 01 2004
-21 -12 -2004
--------------
-20 -11 0000
21 12 2004
-01 -01 -2004
--------------
20 11 0000
31 01 2005
-01 -02 -2005
--------------
30 -01 0000
01 02 2005
-31 -01 -2005
--------------
-30 01 0000
Date1 = "31/01/2005"
Date2 = "01/02/2005"
M = Split(Date1,"/")(1) - Split(Date2,"/")(1) '= -1
D = Split(Date1,"/")(0) - Split(Date2,"/")(0) '= 30
Y = Split(Date1,"/")(2) - Split(Date2,"/")(2) '= 2004 - 2004 ... 0
Y = Y * 12 '= 0 * 12 ... 0
D = D / Abs(D) '= 30 / 30 ... 1
M = Abs(M + D + Y) '= Abs(-1 + 1 + 0) ... 0
Date1 = "01/01/2004"
Date2 = "21/12/2004"
M = Split(Date1,"/")(1) - Split(Date2,"/")(1) '= 01 - 12 ... -11
D = Split(Date1,"/")(0) - Split(Date2,"/")(0) '= 01 - 21 ... -20
Y = Split(Date1,"/")(2) - Split(Date2,"/")(2) '= 2004 - 2004 ... 0
Y = Y * 12 '= 0 * 12 ... 0
D = D / Abs(D) '= -20 / 20 ... -1
M = Abs(M + D + Y) '= Abs(-11 + -1 + 0) ... 12
Date1 = "01/01/2004"
Date2 = "21/12/2005"
M = Split(Date1,"/")(1) - Split(Date2,"/")(1) '= 01 - 12 ... -11
D = Split(Date1,"/")(0) - Split(Date2,"/")(0) '= 01 - 21 ... -20
Y = Split(Date1,"/")(2) - Split(Date2,"/")(2) '= 2004 - 2005 ... -1
Y = Y * 12 '= -1 * 12 ... -12
D = D / Abs(D) '= -20 / 20 ... -1
M = Abs(M + D + Y) '= Abs(-11 + -1 + -12) ... 24