且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将日期格式从 yyyy-mm-dd 更改为 mm/dd/yyyy 派生列

更新时间:2023-02-26 14:15:02

假设您的日期列名为 DateCol

Say your Date Column is called DateCol

您需要从该列创建三个派生列,而不是像这样简单地将它们连接起来

You will need to create three derived columns from that column and than simply concatenate them columns something like this

derivedColumns   Expression 
year             SUBSTRING(DateCol, 1, 4)
day              RIGHT(DateCol, 2)
Month            SUBSTRING(DateCol, 6, 2)

NewDate          SUBSTRING(DateCol, 6, 2) + "/" + RIGHT(DateCol, 2)+ "/"+SUBSTRING(DateCol, 1, 4)

您的 NewDate 列将采用您想要的格式

Your NewDate Column will be in your desired format