xxxxxxxxxx
let date = new Date(1647695970000);
console.log(date.toDateString())
xxxxxxxxxx
from datetime import datetime
# current date and time
now = datetime.now()
timestamp = datetime.timestamp(now)
print("timestamp =", timestamp)
xxxxxxxxxx
import datetime
timestamp = 1635500169 # replace with your actual timestamp value
# Convert timestamp to date
date = datetime.datetime.fromtimestamp(timestamp).strftime('%Y-%m-%d')
print(date)
xxxxxxxxxx
int ts = 1638592424384;
DateTime tsdate = DateTime.fromMillisecondsSinceEpoch(timestamp);
String fdatetime = DateFormat('dd-MMM-yyy').format(tsdate); //DateFormat() is from intl package
print(fdatetime); //output: 04-Dec-2021
xxxxxxxxxx
date -d @xxxxxxxxxx
# use the first 10 digits of the timestamp in place of the x'es.