I am doing like this how can i get time in hh:mm:ss
DateTime now = DateTime.Now;
string dateTimeString = now.ToString("dd/MM/yyyy HH:mm:ss");
Checkout this
12hrs format
Now.ToString("dd/MM/yyyy hh:mm:ss")
24 hrs format
Now.ToString("dd/MM/yyyy HH:mm:ss")
If you want Am/PM
Now.ToString("dd/MM/yyyy hh:mm:ss tt")
Regards
Sudharsan
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.