Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //when you can't use time conversion or are reciving non standard time, such as in a video game clock using a accelerated tick rate.
- int _Hour = DateTime.UtcNow.Hour
- string _12Hour = _Hour > 11 ? ( _Hour == 12 ? 12 : _Hour - 12).ToString() + " PM" : (_Hour==0?12:_Hour).ToString() + " AM";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement