Splitting Date and specially Time in C#. How to get the AM/PM thing -
this question has answer here:
- how am/pm value datetime? 12 answers
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
Post a Comment