Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
每个人我都在使用 MongoDB 作为我的后端,我不知道如何将DateTime 类型转换为ISODate MongoDB,我尝试查看文档和搜索,我找不到任何关于它的信息,你有什么想法吗?这个 ?预先感谢
您可以使用如下代码将 dart DateTime 转换为 ISO8601Date 格式:
DateTime now = DateTime.now(); String isoDate = now.toIso8601String();