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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With