mysql datetime to date/time

hi,
mysql datetime format is yyyy:mm:dd hh:mm:ss.

What is the right way to pass it to Date and Time classes in SmartClient?

thanks!
steven

If you are using the SmartClient Server pass dates as instances of Java.lang.Date.

If you are using REST-style integration with XML or JSON dataFormat, use the XML Schema Date format, eg, 2005-06-07T11:00:00.

try two string to populate into Date formItem in a dynamic form.
2008-03-22T12:14:00
2008-03-22

The date field doesn’t convert them to anything. They are shown as they are in the text field ; the small calender attached still shows the Today’s date.

What might be the problem?
thanks!

If you are providing values directly to a DateItem, eg via defaultValue, you are expected to provide an instance of Date in JavaScript, which you can create from a String via new Date(). See any JavaScript reference for details.

The previous advice about XML Schema date formats applies to the format for network transmission only, eg, how you represent a date in XML being transmitted over HTTP.