Hello... i am in need of some code for the program i am trying to write. I am new at this, so please bare with me

I am writing a simple program that allows the user to click on update time and Date and thus display both those things in a Text box. That i can do. What i cant seem to remember the code for, is the bit where the user selects a radio button called 24hr, then the user hits the update time/date button, and hey presto the time turns to 24hr time. Could someone please get back to me in regards to this?