Solved

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

Posted on 2014-02-09
2
388 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 70

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

726 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