asp.net - Format this datetime without seconds or AM/PM -


i have property set "datetime?" this:

public overridable property mydatetime datetime? 

i'm trying hours , minutes without seconds , without or pm.

i tried this:

mydatetime.value.timeofday.tostring 

that gives me hours, minutes, , seconds without or pm

and tried this:

mydatetime.value.toshorttimestring 

this gives me hours , minutes, gives me or pm.

is there way format looks this?

9:10 

or

2:40 

thanks

you looking custom date , time format.

try this:

mydatetime.value.tostring("hh:mm") 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -