Solved

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

Posted on 2014-02-09
2
382 Views
Last Modified: 2014-02-09
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?
0
Comment
Question by:runnerjp2005
2 Comments
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 39845398
0
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 500 total points
ID: 39845421
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

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now