Splitting Date and specially Time in C#. How to get the AM/PM thing -


this question has answer here:

i have value #7/13/2016 3:20:00 pm# , want separate out date , time. format date "07/13/2016" , time "03:20 pm". have got values startdatetime.tostring("mm/dd/yyyy") , startdatetime.tostring("hh:mm") not sure "am or pm" thing.

if understand correctly, have datetime value trying break separate date , time. microsoft has great documentation on datetime formatting think looking for time element this:

somedatetime.tostring("hh:mm tt"); 

which should output "03:20 pm" or whatever case may be.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -