Date format statements in Spark SQL Query nodes

Hi, I have a question for the Nim Support team.

I am currently trying to create a date column via Spark SQL Query.

When I run the query below, the date data is generated in a different format and not represented in the actual table like yyyy-MM-dd(2024-04-02) which is what I want. How can I resolve these issues?


SELECT year,month,day,
TO_DATE(CONCAT_WS(“-”,year,LPAD(month,2,‘0’),LPAD(day,2,‘0’)),‘yyyy-MM-dd’) AS DATE
FROM #table#


Hey @JaeHwanChoi,

Since you already pull your year, month, and day:

You can bypass the complex query you are doing by using the column combiner and the string to date time nodes.

Here is the result based off that image you sent:

where I just combined year, month, and day with ‘-’ delimiter.

For the string to date, I had the following config:

TL

2 Likes