c# - Datetime Format to Date -


how convert this?

public datetime date { get; set; } 

i need display date.

please 1 convert date only

i need display date.

the datetime structure has numerous ways accomplish this, commonly .toshortdatestring() , .tolongdatestring():

var displaydate = date.toshortdatestring(); 

for further customizations, can supply a formatting string the .tostring() method.


Comments

Popular posts from this blog

c# - Sort XmlNodeList with a specific Node value -

Android Java.Lang.RuntimeException : Unable to start activity Component Info -

actionscript 3 - Equivalent to moveReceived in ElectroServer 5 -