datediff is a function to get the difference of two date. the result will be shown in integer type.
here the simple code that shown how to use the datediff function.
Private Sub Form_Load()
Dim a As Variant
Dim b As Variant
a = Format("3 / 14 / 2008", "dd-mm-yyyy")
b = Format("1 / 4 / 2008", "dd-mm-yyyy")
MsgBox DateDiff("y", a, b)
End Sub
enjoy it...
Wednesday, February 13, 2008
Datediff simple code
at 8:17 PM
Subscribe to:
Post Comments (Atom)









0 comments:
Post a Comment