Wednesday, 24 July 2013

Part of the Day

This is the best way to find the time of day to put into a letter.


dim hours as int = DateTime.Now.Hour
dim str as string
if hours < 12 Then
    str = "Morning"
else if hours < 17 then
    str = "Afternoon"
else if hours > 17 then
    str = "Evening"
End If

No comments:

Post a Comment

Multi Point USB Charger

  USB Plug Charger, 4-Port USB Fast Charger Plug with 33W Intelligent Quick Charge 3.0 Wall Charger, Multi USBPower Adapter UK Fast Charging...