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

前端 未结 6 1090
耶瑟儿~
耶瑟儿~ 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:50

    If you use the intl package:

    var date = DateTime.fromMicrosecondsSinceEpoch(miliseconds * 1000)
    DateFormat(DateFormat.YEAR_MONTH_DAY, 'pt_Br').format(date.toUtc())
    

    Output: 10 de abril de 2020

提交回复
热议问题