2 Replies Latest reply on Jun 5, 2009 9:48 AM by istrasci

    Date#toLocaleTimeString in 24-hour

    istrasci Level 1

      Here's my simple code:

       

      var d:Date = new Date();

      myTextField.text = d.toLocaleTimeString();

       

      The text field shows only 12-hour time (e.g., at 5:00pm - 5:00:00).  Does anyone know of a way to output in 24-hour time (i.e., 17:00:00)...?  Is it possible with a DateFormatter which I just thought of and haven't tried yet?