【发布时间】:2017-03-02 14:39:36
【问题描述】:
我有一个 Ecto.DateTime 我正在尝试从中提取信息。
这工作正常:
{{y, m, d}, _} = Ecto.DateTime.to_erl(date)
"#{m}/#{d}/#{y}"
我现在正在尝试获取小时/分钟/秒值:
{{y, m, d}, {h,m,s}} = Ecto.DateTime.to_erl(date)
"#{m}/#{d}/#{y}"
但我得到了这个错误
右侧值不匹配:{{2017, 5, 5}, {12, 0, 0}}
【问题讨论】: