windows - Changing date-time format in c# -
creating digital clock. i'm newbie c#. code that
timelbl.text = datetime.now.tolongtimestring(); datelbl.text = datetime.now.tolongdatestring(); here is, result
i got questions:
- can change time's format 24 hour? how?
- how change date digits format (like dd/mm/yyyy) or result in exact language (i mean, words "monday, july" in language, windows support, ex turkish)?
- how make window dynamically change it's width (depending on text length)?
please me,to achieve these 3 things. thx in advance
ans 1:
timelbl.text = datetime.now.tostring("hh:mm:ss"); will convert time 24 hour format.
ans 2:
datelbl.text = datetime.now.tostring("dd/mm/yyyy"); will convert date format 31/06/2012
more formats here
Comments
Post a Comment