How to add current time?

I had a test where it asked me to check the current time and add the time, for ex: if time is 10:47 then 10+47= 57 . after adding check this is prime number or not. can anyone help me on this please …


This will give you the total of current time Hour+Minute.

Convert.ToString( Now.Hour + Now.Minute)
1 Like


 yourTime = "10:47"

 Int addTime =  CInt(yourTime.Split(":"c)(0)+CInt(yourTime.Split(":"c)(1)
1 Like

Thank you , it worked

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.