VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



calculate your exact age

by john tomson (9 Submissions)
Category: Miscellaneous
Compatability: VB.NET
Difficulty: Unknown Difficulty
Originally Published: Tue 15th November 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)

calculate your exact age

API Declarations


commandbutton called commandbutton1, commandbutton2

Rate calculate your exact age



a$ = DateDiff("yyyy", TextBox1.Text, TextBox2.Text) ' calculate year
b$ = DateDiff("d", TextBox1.Text, TextBox2.Text) ' calc days
c$ = DateDiff("m", TextBox1.Text, TextBox2.Text) ' calc months
d$ = (b$ * 24) ' calc hours
e$ = (d$ * 60) ' calc minutes
f$ = (e$ * 60) ' calc seconds
MsgBox a$ & " Years  " & vbCrLf & b$ & " Days " & vbCrLf & c$ & " Months " & vbCrLf & d$ & " Hours " & vbCrLf & e$ & " Minutes " & vbCrLf & f$ & " Seconds", , "Exact Age"
End Sub

Download this snippet    Add to My Saved Code

calculate your exact age Comments

No comments have been posted about calculate your exact age. Why not be the first to post a comment about calculate your exact age.

Post your comment

Subject:
Message:
0/1000 characters