This is code I have been using already.Code:Dim time As String
time = Now.ToString("HH:mm")
I have format, for example
08:00
And how to get format
8:00
Thanks!
Printable View
This is code I have been using already.Code:Dim time As String
time = Now.ToString("HH:mm")
I have format, for example
08:00
And how to get format
8:00
Thanks!
Use "h:mm" instead of "HH:mm".
Yes, that's it, i tried with H:mm, and it didn't work, and h:mm work. Thanks!
And how to check is in some textbox current date every second, and if it is display in messagebox ("yes")
?
You need to read the documentation. It's all there in MSDN library:
http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx
"how to check is in some textbox current date every second": that's what timers are for. You need a timer, set its interval to 1000ms (1 second) and in the timer.tick event handler, you read the current date (Date.Now) and get the date part of it, compare that to your date.