Solved

Determination of current shift Visual Basic

Posted on 2013-01-22
5
157 Views
Last Modified: 2013-01-24
Hi, I need to build something in Visual Basic to determine the current shift. There are 4 shifts:

1. 06:50 AM
2. 12:50 PM
3. 06:50 PM
4. 12:50 AM

Can someone assist?
0
Comment
Question by:JessyRobinson1234
  • 2
  • 2
5 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
Comment Utility
You can compare the

Today.TimeOfDay

to those times

http://msdn.microsoft.com/en-us/library/system.datetime.timeofday.aspx
0
 

Author Comment

by:JessyRobinson1234
Comment Utility
Thank you, silly question but where does Console.WriteLine Output go to ?
I tried Under Tools | Options | Debugging, General and Chose the Redirect all Output Window text to the immediate window but no luck.
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
Comment Utility
That comes to command prompt if its a console app. If its winforms, use msgbox.
0
 
LVL 85

Expert Comment

by:Mike Tomlinson
Comment Utility
In the IDE, for WinForms apps, Console.WriteLine() will redirect to the "Output" window.
0
 

Author Closing Comment

by:JessyRobinson1234
Comment Utility
Thanks
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
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.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 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

7 Experts available now in Live!

Get 1:1 Help Now