0

I used this to get the timestamp

long epoch = new java.text.SimpleDateFormat ("dd/MM/yyyy HH:mm:ss").parse("09/22/2008 16:33:00").getTime();

It returns 989929568.

Then I used online converter to change this number back to standard time,

what I get is

05 / 15 / 01 @ 12:26:08pm

, not

09/22/2008 16:33:00

What is happening?

1 Answer 1

6

change pattern to

MM/dd/yyyy HH:mm:ss

because 22 cannot be month

Sign up to request clarification or add additional context in comments.

3 Comments

I try, but I get 1222115580000, is still not correct.
that is correct representation of time you entered, why do you think it is incorrect
I forgot devide by 1000, Thank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.