I have date with this format in my db '1631363150' i want to change it to dd-mm-yyyy (DART)
CodePudding user response:
Let's try if it would be your reference time
void main() {
var date = DateTime.fromMillisecondsSinceEpoch(1631363150 * 1000);
print("get time: ${DateFormat("dd-MM-yyyy").format(date)}");
}
output: get time: 11-09-2021