xxxxxxxxxx
date -d @xxxxxxxxxx
# use the first 10 digits of the timestamp in place of the x'es.
xxxxxxxxxx
String sdatetime = "2021-12-04";
DateTime sdate = DateTime.parse(sdatetime);
int stimestamp = sdate.microsecondsSinceEpoch;
print(stimestamp); //output: 1638555300000000
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)