gpt4 book ai didi

concatenation - 如何在 tableau 8.0.0 中连接年和月?

转载 作者:行者123 更新时间:2023-12-04 06:04:52 24 4
gpt4 key购买 nike

我有一个日期时间字段。例如2013-08-22 12:00:00 上午。我想连接年和月,我希望输出为 201308。

当我尝试 year (datetime_field)+month(datetime_field) 时,我得到的是 2013+08=2021 .. 即它添加而不是连接。有人可以告诉如何获得输出为 201308 吗?

最佳答案

更像是

str(year(datetime_field)) + str(month(datetime_field))

应该给你你想要的。
str 函数将您的数字数据转换为字符串,将 + 设置为字符串连接运算而不是算术加法运算。

关于concatenation - 如何在 tableau 8.0.0 中连接年和月?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18381433/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com