How do I convert created date 2018-04-10T04:00:00.000Z (ISO 1861) string to Date Time in Powery Query?

huangapple go评论87阅读模式
英文:

How do I convert created date 2018-04-10T04:00:00.000Z (ISO 1861) string to Date Time in Powery Query?

问题

我从SharePoint Online列表中获取到一个日期,格式为“2018-04-10T04:00:00.000Z”[在ISO 1861中]。我想将其转换为Date或String对象,得到类似于“01-04-2018”的结果,即“dd-MM-YYYY”。在Power Query中如何实现这个转换?

英文:

I get a created date in data from a SharePoint Online list to Power BI, which looks like this "2018-04-10T04:00:00.000Z"[in ISO 1861]. I want to convert it in order to obtain a Date or String object and get something like "01-04-2018" that its "dd-MM-YYYY". How can I do it in power Query?

答案1

得分: 0

你不需要使用 Power Query,你可以直接在数据展示中使用列工具,那里有一个格式选项,你可以选择你想要的数据格式。

英文:

you don't need do use power query, you can just use the column tools in data exibition, there's a format option where you can choose which data format you want.

答案2

得分: 0

= 如果你将类型设置为datetime,转换将会自动进行

How do I convert created date 2018-04-10T04:00:00.000Z (ISO 1861) string to Date Time in Powery Query?

= Table.TransformColumnTypes("PriorStepNameHere",{{"Column1", type datetime}})

英文:

The conversion should be automatic if you set the type to datetime

How do I convert created date 2018-04-10T04:00:00.000Z (ISO 1861) string to Date Time in Powery Query?

= Table.TransformColumnTypes("PriorStepNameHere",{{"Column1", type datetime}})

答案3

得分: 0

我猜你可能正在使用2.0版本的实现来连接SharePoint列表。尝试通过1.0版本进行连接。

英文:

I guess you might be using Implementation 2.0 while connecting to SharePoint list. Try to connect via 1.0.

How do I convert created date 2018-04-10T04:00:00.000Z (ISO 1861) string to Date Time in Powery Query?

huangapple
  • 本文由 发表于 2023年7月27日 21:10:56
  • 转载请务必保留本文链接:https://go.coder-hub.com/76780094.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定