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!
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!
Try this DateFormat.getDateFormat(mContext).format(new Date(myTimestamp * 1000))
As new Date()
requires milliseconds instead of seconds, you have to multiple by 1000