I have a date variable and want to create a new variable with the name of the day of the week.
I use the following for this.
a.date format=DOWNAME. AS DayOfWeek
date | DayOfWeek
-----------------------
25/06/2024 | Tuesday
However, if I export this to Excel the date is exported instead of the name of the day.
How can I convert the name of the day to text (character variable) so that it is exported as text to Excel?
I found the solution myself. It's actually very simple.
PUT(A.date, DOWNAME.) AS DayOfWeek