Solved

VB.Net - Easiect Way to Compare Datess With Time

Posted on 2014-03-21
2
179 Views
Last Modified: 2014-03-24
Good Day Experts!

I have the ever popular question about how to compare 2 dates...one is a SQL table date and the other is Date.Now.  

Here is a sample of the SQL table date:
3/21/2014 1:12:29 PM

Date.Now:
3/21/2014 3:42:13 PM

What I need to do is to add 1hr and 20minutes to the SQL table date and then compare it to Date.Now.  

Can you help point me in the right direction?

Thanks,
jimbo99999
0
Comment
Question by:Jimbo99999
[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

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 39946268
Your SQL date is retrieved in your .Net application and stored in a DateTime variable?

YourDTVariable = YourDTVariable.AddMinutes(80)

if YourDTVariable < DateTime.Now ...
0
 

Author Comment

by:Jimbo99999
ID: 39946384
Hello...yes, I have it in a variable.  I will try out now.

Thanks,
jimbo99999
0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

622 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