如何在 Google Data Studio 中显示格式为 24 小时格式的日期时间戳?

How can I show a datetime timestamp formatted as 24 hour format in Google Data Studio?

我在 Data Studio 中有一个字段 timestamp。类型是日期时间。

当我尝试按时间戳排序时,顺序不正确,似乎是因为它没有使用 24 小时格式。

如何在 Google Data Studio 中显示格式为 24 小时格式的日期时间戳?

我尝试了 FORMAT_DATETIME、TODATE 和 PARSE_DATETIME 的不同用途,但无法使其正常工作。

的格式是“2021 年 5 月 17 日,2:37:55 下午”。

想要的格式是“2021-05-17,14:37:55”

可以使用FORMAT_DATETIME function below, where timestamp represents the field (%F formats the Date as YYYY-MM-DD while %T formats the Time as HH:MM:SS; for a full list of the supported symbols and their respective use case, have a look through the Supported format elements for DATETIME):

来实现
FORMAT_DATETIME("%F, %T", timestamp)

Editable Google Data Studio Report (Embedded Google Sheets 数据源)和一张 GIF 来详细说明: