entering date

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hi
My computer date format as following dd/mm/yyyy (as per the date below the clock on my computer).
I entered this date in an excel cell: 2019/09/08 (09 is sept). To my surprise, excel converted this date to the following

08/09/2019

Why is that?

I thought excel should not accept 2019/09/08 as a date and keep it as it is (to the left hand side of the cell) because it should be considered as string not number, since I did not follow the format of the computer date.

Thank you very much
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Hi
My computer date format as following dd/mm/yyyy (as per the date below the clock on my computer).
I entered this date in an excel cell: 2019/09/08 (09 is sept). To my surprise, excel converted this date to the following

08/09/2019

Why is that?
I am not sure why it chose that order given your computer's setting; however, if you wish to enter dates in YEAR, MONTH, DAY order, use dashes instead of slashes and I think Excel will convert it correctly. For example...

2019-09-08
 
Upvote 0
Hi, What abuot
Code:
Cells(2, 3) = Date
Cells(2, 3).NumberFormat = "yyyy/mm/dd"
 
Last edited:
Upvote 0
Excel is simply trying to be "helpful" it recognises 2019/09/08 as a date & converts as such.
To stop that happening, change the cell format to text before entering the date, or put an apostrophe as the first character.
 
Upvote 0
Excel is simply trying to be "helpful" it recognises 2019/09/08 as a date & converts as such.
To stop that happening, change the cell format to text before entering the date, or put an apostrophe as the first character.

If so, why not:
From the format cell > Custom > Type yyyy/mm/dd
 
Last edited:
Upvote 0
My take is that the OP wants the value to remain as a string, rather than be converted to a date.
 
Upvote 0

Forum statistics

Threads
1,213,533
Messages
6,114,179
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top