tags:

views:

30

answers:

1

Hello! I've tried to convert a UNIX Timestamp to todays date time.

Like I have a simple UNIX Timestamp and then I want to convert it like this:

Today at: theTimeFromMyTimestamp

Anyone that has a correct solution for this?

Thanks in advance!

+1  A: 

Try this DateFormat.getDateFormat(mContext).format(new Date(myTimestamp * 1000))

As new Date() requires milliseconds instead of seconds, you have to multiple by 1000

WarrenFaith
Will check now..
Julian Assange
Thank you! It worked.
Julian Assange