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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -