A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi,
This Python function works
pd.to_datetime(xl("A2"),format='%y%m%d')
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I want to enter a date as yymmdd to a spreadsheet (year (last 2 digits, Month, and day) but want to display it as mmddyy (month, day, year). How can I do that without using any macros or formula. I am not familar with macros - if I use a macro can I have it applied for each item in a column even those that are added after the macro has been applied
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi,
This Python function works
pd.to_datetime(xl("A2"),format='%y%m%d')
While you have considerable flexibility in how you display a date value, there are a limited number of options for how you input one. The option is specified in the Control Panel and applies globally to your entire system, not just to Excel. Furthermore, all the options require some special character (such as / or -) to be placed between the three parts. The absence of a special character will cause Excel to treat the value as a standard numeric value.
If the value is already present in your workbook and you wish to display it as a date in a different cell, you can convert the integer to a date value with the formula
=LET(d,TEXT(A1,"0"),DATE("20"&LEFT(d,2),MID(d,3,2),RIGHT(d,2)))
You will need to use a 4-digit year if your dates fall out of the 21st century.
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more