I want to show a date to the users in my app. Some users may use 12-hour system, some may use 24-hour system. How can I get if the user's system is using 12-hour system or 24-hour system, so that I can print a date depending on that?
I want to show a date to the users in my app. Some users may use 12-hour system, some may use 24-hour system. How can I get if the user's system is using 12-hour system or 24-hour system, so that I can print a date depending on that?
.Net gets DateTime formats directly from OS. You can use ToShortTimeString() or ToLongTimeString() methods to get representation of user.
DateTime.Now.ToShortTimeString()