How do I convert 20230102 to Monday?
Using python, I need to accomplish this. I have a column of numbers in the format yyyymmdd.
How do I convert 20230102 to Monday?
Using python, I need to accomplish this. I have a column of numbers in the format yyyymmdd.
Parse with strptime and format with strftime:
>>> from datetime import datetime >>> n = 20230102 >>> datetime.strptime(str(n), "%Y%m%d").strftime("%A") 'Monday' See strftime() and strptime() Format Codes for documentation of the % strings.