Expand my Community achievements bar.

The difference between AS Date and Java Date.

Avatar

Level 1

Hello,

Why there are differences between AS Date and Java Date?
I have a startTime field in an ActionScript class and also have a startTime in the related Java class. The time set in AS is new Date(2009,11,19,10,35,50); and then I find it has the value of 2009-12-19T10:35:50.000-0500 in the Java object.

Does anyone know why and how to make it as the same in both side?

Thanks,

1 Reply

Avatar

Level 10

You can use the Java API to convert the datetime to your own format.

Pls refer this:

http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html

Nith