我试图在点击一个按钮后在Text
小部件中显示当前的DateTime
.以下内容可以,但我想更改格式.
Current approach个
DateTime now = DateTime.now();
currentTime = new DateTime(now.year, now.month, now.day, now.hour, now.minute);
Text('$currentTime'),
Result个
YYYY-MM-JJ HH-MM:00.000
个
Question
我怎样才能go 掉那:00.000
个零件呢?