Forum Discussion
How to make the format of date from 1/1/2022 to 2022/1/1?
- Aug 18, 2022
It looks like you have texts in column A, not dates. If so, you may convert them to dates by selecting column A, Data->Text to Columns, on third step of the wizard select Date and MDY.
SusanHung Use custom cell formatting. Right click on cell then choose Format Cells. Use yyyy/M/D to custom number format. See below screenshot. If you want to show result on different cell by formula then can use TEXT() function like.
=TEXT(A1,"yyyy/M/D")
Harun24HR Thanks for your promptly reply. In fact, I would like to sort the A column by date but it can't distinguish that 11 (Nov.) is more than 5, 4 and others. Do you have any comments on this. thanks.
- Harun24HRAug 17, 2022Bronze Contributor
SusanHung Because TEXT() function return string data as text. So you can sort then. You can try SORT() function then use text like
=TEXT(SORT(A1:A8,,-1),"YYYY/MM/DD")
- SusanHungAug 18, 2022Copper Contributor
I'm not sure if I'm missing any data processing. I couldn't get the date sorting as C column. I listed what i need as the C column (by manual). Thanks for your comments.
- SergeiBaklanAug 18, 2022Diamond Contributor
It looks like you have texts in column A, not dates. If so, you may convert them to dates by selecting column A, Data->Text to Columns, on third step of the wizard select Date and MDY.