1

My Google Sheets is currently set to UK London GMT

I have some data that is needed in UK format and other data that is needed in US format within the same sheet.

I'm using date time as dd-mm-yyyy hh:mm:ss and have been trying to convert this to US yyyy-mm-dd hh:mm:ss

When formatting the UK date time to as text and using this formula

=ARRAYFORMULA(REGEXREPLACE(A2:A, "(\d{4})-(\d+)-(\d+)", "$3/$2/$1"))

It should be converting for me however is stays the same.

I have also tried simply copying and pasting in a new column with the intention of changing format from within formatting settings but when pasting it seems to randomly select different formats in some rows using / instead of - and in other rows returning a number instead of date time.

How can I get this to work correctly?

player0
  • 124,011
  • 12
  • 67
  • 124
  • 1
    Can you share an example of the sheet you are working with? Also, the original (UK) dates are in plain text or formatted on the sheet? – Kessy Oct 04 '22 at 13:02

1 Answers1

1

try:

=TEXT(A2, "e-m-d h:mm:ss")

enter image description here

player0
  • 124,011
  • 12
  • 67
  • 124