First it checks to see if the value of the hour returned is less than 12 (so basically from midnight until 11 AM) and, if so, it writes to a second dynamic text box telling it to display AM. If that condition isnt met, then the else statement writes PM to the second text box.
Then the while statement says that while the value of the hour is greater than twelve, then twelve should be subtracted from the number assigned to the hours variable. So if getHours ( ) returns 13, then findhours will be set to 1 (1 p.m.).
Then it checks to see if the values of the hour, minutes, and seconds is less than 10, and if so, appends a text 0 in front of the value.
Lastly, it strings them all together and writes them to the dynamic text box.


