[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

vb.net if datetime.now > 17:00

Posted on 2014-03-21
3
Medium Priority
?
287 Views
Last Modified: 2014-03-21
Hi experts,

im having a real brain dead kinda day...

I am trying to figure out how to write

if the time is greater than 17:00 UTC then ...

but for the life of my my brain is on holiday one day earlier than the body and i cant think...
0
Comment
Question by:SimonPrice33
[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
3 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 2000 total points
ID: 39945296
have you tried:

DateTime.UtcNow.Hour>17
0
 

Author Comment

by:SimonPrice33
ID: 39945300
i think so....

its been one of those days...

but got the code now...

 Dim date1 As Date = DateTime.Now.Today & " " & #2:23:30 PM#
        Dim result As Integer = DateTime.Compare(dt, date1)
        Dim relationship As String

        If result < 0 Then
            relationship = "is earlier than"

            MessageBox.Show(relationship)
        ElseIf result = 0 Then
            relationship = "is the same time as"
            MessageBox.Show(relationship)
        Else
            relationship = "is later than"
            MessageBox.Show(relationship)
        End If
0
 

Author Closing Comment

by:SimonPrice33
ID: 39945307
simpler than my comparison :)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
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…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

649 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