Date Time format in Flutter dd/MM/YYYY hh:mm

前端 未结 6 1091
耶瑟儿~
耶瑟儿~ 2020-12-28 14:10

By using this :

Text(new DateTime.fromMillisecondsSinceEpoch(values[index][\"start_time\"]*1000).toString(), 

I am getting the ty

6条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-28 14:49

    If you use the intl package

    final f = new DateFormat('yyyy-MM-dd hh:mm');
    
    Text(f.format(new DateTime.fromMillisecondsSinceEpoch(values[index]["start_time"]*1000)));
    

提交回复
热议问题