Excel date format issues

Hi I am having issues with the date format on excel, I have been emailed a spreadsheet and the date format should look like this 06/08/1998 but instead it appears like this 41894. I have tried to create a customs format but nothing seems to work.

Can anyone help? Thanks

MacBook Pro 13″, macOS 11.4

Posted on Aug 9, 2021 3:34 AM

Reply
1 reply

Aug 9, 2021 4:58 AM in response to lynneblackburn22

Yes, that sometimes happens here too.


Assuming the Excel date serial number in A2, you can convert to a Numbers date-time with this:



=DATE(1900,1,1)+A2−2


Replace the , in the formula with ; if your region uses , as a decimal separator.


Once the numbers are converted to dates, select the dates, command-c to copy, and Edit > Paste Formula results. Then delete the column with the date serial numbers.


And there is also another way, using a short script. The advantage is this one is you don't have to add an extra column, enter a formula, and do housekeeping afterward.


Step 1: Copy-paste script below into Script Editor (in Applications > Utilities)

Step 2: Select the cells with the serial number dates

Step 3: Click the <run> button in Script Editor


If "nothing happens" make sure Script Editor is listed and checked at System Preferences > Security & Privacy > Privacy > Accessibility.


Since this changes the values in your table I suggest testing on a copy of the table first to make sure it is doing what you want it to do.


The script:


set startdate to date "Monday, January 1, 1900 at 00:00:00"

tell application "Numbers" to tell front document
	tell active sheet
		tell (first table whose class of selection range is range)
			repeat with c in (get selection range)'s cells
				set value of c to startdate + ((value of c) - 2) * days
			end repeat
		end tell
	end tell
end tell



You can give feedback to Apple about this problem via Numbers > Provide Numbers Feedback in your menu.


SG

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Excel date format issues

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.