I need help with converting standard time to military time through a button.
Then being able to use another button to convert back.
NH1
0
Light Poster
Recommended Answers
Jump to PostWhere are you getting the time you want to convert? Where do you want the result to end up?
If you have it in a DateTime object, then:
myDTobject.ToString("hh:mm"); // 'standard' time myDTobject.ToString("HH:mm"); // 'military' (or 24 hour) time
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.