Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2023 01:16 AM
Hi @Vigneshraja Palaniraj ! Thanks for the help.
Some example values: i'm getting year = 2023 and week = 13, then I'm making that into a string combining them:
df_loaded = df_loaded.withColumn("week_year", F.concat(F.lit("3"),F.col('Week'), F.col('Jaar')))
I add '3' in front because I want to have the wednesday of this week. This results in this string: 3132023
which I use to get the date:
df_loaded = df_loaded.withColumn("date", F.to_date(F.col("3132023"), "uwy"))
desired date I would like to get here is: 2023/03/29 (the wednesday in week 13).
The code gives no errors, but when I try to display the table, the error comes up