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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

format date/time

Status
Not open for further replies.

brews

Technical User
Dec 12, 2007
194
US
Trying to show date and time in a label where it will update constantly. The formats that I know are:
Code:
       me.Items("lblDate").Text = DateTime.Today ' day only

        ssMain.Items("lblDate").Text = DateTime.Now 'date,hh:mm:ss
Would like to have date,hh:mm. Thanks.


 
What do you mean it doesn't work? It produces this:

12/27/2011, 10:12

That's what I thought you asked for.
 
When it is placed into code the msg appears: 'Value of type Date cannot be converted to Integer.' And 'Too many arguments to Public ReadOnly Default Property Chars(index As Integer) as Char'.

That's what I mean. It does not work for me as is.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top