使用Microsoft Excel 2016-查询编辑器-高级编辑器。
我对这种语言不熟悉。
let
SettingsSheet = Excel.CurrentWorkbook(){[Name="Table2"]}[Content],
#"TimeRange" = Table.TransformColumnTypes(SettingsSheet,{{"From", type datetime}, {"To", type datetime}}),
From = #"TimeRange"[From],
#"To" = #"TimeRange"[To],
DateFormatString = "mm/dd/yy",
#"FormattedFrom" = Format(From,DateFormatString),
...
(Further in the code I will need to build a URL string from it.)
当我搜索将日期格式化为字符串的语法时,我总是会找到此Format(...,...)
函数,但会收到错误消息
无法识别名称“格式”。确保拼写正确。
正确的语法是什么?
该语言称为Power Query。我要查找的表达式是DateTime.ToText(DateTime, DateFormatString)
(而不是Format(DateTime, DateFormatString)
)。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句