Hi
Mohad,
You can get time using following method:
DateTime dt = DateTime.Now;
string HrTime12 = dt.ToString("hh:mm");
string HrTime24 = dt.ToString("HH:mm");
If you would like to see more about Date and Time format, please refer following:
Custom Date and Time Format Strings[
^]
Thanks,
Imdadhusen