Stuart Bell
Stuart Bell

Reputation: 59

Google sheets won't format time date correctly

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?

Upvotes: 1

Views: 617

Answers (1)

player0
player0

Reputation: 1

try:

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

enter image description here

Upvotes: 1

Related Questions