I want to convert mm/dd/yyyy to yyyy/mm/dd with function on Google Sheets.
I applied TEXT function like the picture but it's not working. How can I convert this?
Web Applications Stack Exchange is a question and answer site for power users of web applications. It only takes a minute to sign up.Sign up to join this community
text() is returning the value without change, chances are that the value is not a numeric date but a text string that just looks like a date. Set File > Settings > Locale to the real locale you want to use, and re-enter the dates in local format.
If you have many such dates to convert, use a formula to convert them, like this:
=to_date(value(regexreplace(trim(D28), "(\d+)/(\d+)/(\d+)", "$3-$1-$2")))
Format the resulting dateserials as Format > Number > Date or another date format of your choosing. See this answer for an explanation of how date and time values work in spreadsheets.