Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Midnight, date change. How to dectect

Status
Not open for further replies.

bigracefan

Programmer
Apr 2, 2002
304
US
I have an application that does some date calculations. Our workplace has three shifts. The third shift starts on one day and ends on the other. Is there a good way to figure out what side of midnight I'm on. The shifts can vary so I don't have the luxury of saying it always starts and ends at such and such a time. It is possible for some shifts to be of equal distance from midnight too.
 


Hi,

The integer part of the date will be one greater after midnight.

ie Today 23:00 is less than Tomorrow 1:00, taken together as Date/Time.

Skip,
[sub]
[glasses] [red]Be Advised![/red] The only distinction between a bird with one wing and a bird with two, is merely...
a difference of A Pinion! [tongue][/sub]
 
I'm not real sure what you are asking for, but VB has some built in functions that may help.

Debug.Print "Date: " & Date
Debug.Print "Time: " & Time
Debug.Print "Date and time: " & Now

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
I ended up dumbing it up to get my answer. I just check now and see if it's AM or PM. One of those things where the obvious answer is hard to see. Thanks for quick replies thou.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top