📌  相关文章
📜  字符串到日期时间的转换 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:19.653000             🧑  作者: Mango

代码示例2
dependencies:
  intl: ^0.17.0
  
import 'package:intl/intl.dart';

DateFormat dateFormat = DateFormat("yyyy-MM-dd HH:mm:ss");

String string = dateFormat.format(DateTime.now()); //Converting DateTime object to String

DateTime dateTime = dateFormat.parse("2019-07-19 8:40:23"); //Converting String to DateTime object