vb.net stored datetime is within 15 seconds from now()

Hi all,


i have stored a datetime dv.Row.Item("Time") and i want to check if that time is withing the last 15 seconds so a can show an image


how could i do this if an if statement?
runnerjp2005Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
AndyAinscowConnect With a Mentor Freelance programmer / ConsultantCommented:
something like this is what you want
        Dim dt As DateTime
dt = dv.Row.Item("Time")
        If dt <= DateTime.Now And dt >= DateTime.Now.AddSeconds(-15) Then
            'show your image
        End If
0
 
Éric MoreauSenior .Net ConsultantCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.