- Home
·
- Miscellaneous
·
- Calculate Age...Using DTPicker and DatePart It's very Simple and Hope you like it. All you need is
Calculate Age...Using DTPicker and DatePart It's very Simple and Hope you like it. All you need is
Calculate Age...Using DTPicker and DatePart It's very Simple and Hope you like it. All you need is a textbox and dtpicker
Rate Calculate Age...Using DTPicker and DatePart It's very Simple and Hope you like it. All you need is
(1(1 Vote))
Dim a,b,c,d,e,f As Integer
a = DTPicker1.Year
b = DatePart("yyyy", Now)
c =(b-a) * 365.25
d = DateDiff("y", DTPicker1.Value, Now)
e = Right(Format$(c, ".00"),2)
If e = 25 Then
c = c + 0.75
ElseIf e = 50 Then
c = c + 0.5
ElseIf e = 75 Then
c = c + 0.25
End If
f = b -a
If c > d Then
f = f - 1
End if
Text1.Text = f
End Sub
Calculate Age...Using DTPicker and DatePart It's very Simple and Hope you like it. All you need is Comments
No comments yet — be the first to post one!
Post a Comment