1 Reply Latest reply on Nov 18, 2008 7:43 AM by dietmar.paulus

    Store "time" as Date instead of String?

    EvolvedDSM Level 2
      I have an input field that allows a user to specify a time in the format of H:MM AM/PM. of course, this is just a text string. This value needs to be saved to my data table as a Date object, since the column it will be stored in is of data-type "datetime".
      I had thought about doing something like...
      var newTime:Date = new Date();
      newTime.time = timeInput.text;
      vo.theTime = newTime;

      where theTime is the datetime data type value of a value object that sends data to my table.

      This doesn't work for me though, as .time is of type Date, and .text is of type String.

      So hopefully looking for some help on a simple way to do this. thanks