Skip to content

Instantly share code, notes, and snippets.

@jrosell
Last active March 22, 2023 13:41
Show Gist options
  • Save jrosell/11a4fb44bf6ef5f2fd1bbfcb0148df63 to your computer and use it in GitHub Desktop.
Save jrosell/11a4fb44bf6ef5f2fd1bbfcb0148df63 to your computer and use it in GitHub Desktop.
When having Google Sheets in spanish or catalan, you can use these formulas to parse a texts to a proper date or number.
# From m/d/yyyy text to yyyy-mm-dd text.
=SUBSTITUTE(RIGHT(A4;4)&"-"&IF(LEN(A4)>9;LEFT(A4;2);"0"&LEFT(A4;1))&"-"&MID(A4;FIND("/";A4)+1;2);"/";"")
# From m/d/yyyy text to yyyy-mm-dd date.
=DATEVALUE(SUBSTITUTE(RIGHT(A4;4)&"-"&IF(LEN(A4)>9;LEFT(A4;2);"0"&LEFT(A4;1))&"-"&MID(A4;FIND("/";A4)+1;2);"/";""))
# From text 3.5 to 3,50 number
=VALUE(SUBSTITUTE(B5;".";","))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment