0

How can I convert this string:

Tue Jan 24 14:59:20 BRT 2017.

Into a date that includes day month year and time and timezone, using Excel functions only.

I have several cells with dates following this format. I have to compute the difference between some of these dates in minutes. I believe that the first step is converting the date to a String to a real date information. Then, I will be able to: order the dates and compute the time between consecutive dates.

6
  • 2
    Excel date/times do not include time zone information. Commented Sep 19, 2017 at 14:32
  • 1
    ...Doesn't the string already have that? Can you post an example of the expected output? Will all the strings have that exact format? More examples would help. Commented Sep 19, 2017 at 14:33
  • Possible duplicate of Format code for a date with time zone in excel Commented Sep 19, 2017 at 14:35
  • How can i break the String and collect the date parts that i need? Commented Sep 19, 2017 at 14:42
  • You will need to lose the time zone information, and as such if you are comparing all the date/times over multiple time zones you will also need to convert them to a standard time zone to do the math. If it is all in the same time zone then this is simpler. If in various you will need a table that tells excel how much time to add or subtract to get to a standard. Commented Sep 19, 2017 at 14:46

1 Answer 1

1

Use this formula:

=--(SUBSTITUTE(MID(A1,5,LEN(A1)),"BRT",""))

Then format it to the format you want.

It will now work in math equations.

enter image description here

Sign up to request clarification or add additional context in comments.

4 Comments

(@user3444287, If the timezone does change, you could also add a MID() to pull out "BRT" instead of putting it in there directly.)
i was able to remove the timezone using notepad++, but i still cannot convert to a date dropbox.com/s/44q0kfxc2ivnqy1/Sem%20t%C3%ADtulo.png?dl=0
did you try my formula on the original data?
it not worked, but i think i did otherway using string manipulation dropbox.com/s/44q0kfxc2ivnqy1/Sem%20t%C3%ADtulo.png?dl=0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.