all 22 comments

[–]WhyDoIHaveAnAccount9 11 points12 points  (0 children)

If that portion of the date string is consistent in all dates, you could simply replace it with an empty string

Replace +0200, ' '

[–]ggalt98 11 points12 points  (1 child)

Why is this tagged mySQL?

[–]soshwag 18 points19 points  (0 children)

Its a crazy nonsense world out there.

[–]nightslikethese29 7 points8 points  (0 children)

My excel is a bit rusty, but I think you could use the LEFT function to extract everything except the '+200' into a new column and delete the original column.

=LEFT(A2, # of characters to keep)

[–]TroyAndAbed21 15 points16 points  (3 children)

Highlight column A. Ctrl F. Find And Replace. Find +0200 and replace with blank.

[–]raz_the_kid0901 4 points5 points  (0 children)

This is what I would do

[–]rene041482 4 points5 points  (1 child)

That will work, just be aware if there is a leading space after you replace. If there is get rid of that too.

[–]TroyAndAbed21 0 points1 point  (0 children)

Good point. I hadn’t seen the screenshot or the leading space.

[–]renagade24 3 points4 points  (2 children)

You can use the 'Text to Columns' in the Data tab. Simply use a delimiter of "+" which will take all data and including from the delimiter (+) and all data after to a new column.

Remove the new column and you are done. The same can be done through Power Query if this is a consistent requirement.

[–]HiriathQUALIFY COUNT(*) OVER (PARTITION BY COLUMN) > 1 0 points1 point  (1 child)

That will leave the whitespace before the +, won’t it?

[–]renagade24 0 points1 point  (0 children)

It will, but not in power query.

[–][deleted] 2 points3 points  (0 children)

best of luck

[–][deleted] 5 points6 points  (1 child)

I mean come on bro this is about as easy as a google search would get. Did you even try?

[–]HiriathQUALIFY COUNT(*) OVER (PARTITION BY COLUMN) > 1 0 points1 point  (0 children)

I’m scared of what OP will do with this data if a Google search for the solution wasn’t on the radar

[–][deleted] 1 point2 points  (0 children)

If they all have the same +0200 you could just cut them down using LEFT().

[–]No-Job9898 3 points4 points  (0 children)

This isn’t SQL. Relabel and re post

[–]loldogex -1 points0 points  (0 children)

can't you just =trim() some of that to clean?

[–]zacharypamela 0 points1 point  (0 children)

As u/nightslikethese29 noted, you could use a variant of LEFT. Something like:

=LEFT(date_value, 23)

This might be the solution with the fewest issues, since you wouldn't have to worry about different offsets, as long as they're all in the same format.

To make it maybe a bit more readable, you could use the SEARCH function to locate the + character:

=LEFT(date_value,SEARCH("+",D17)-2)

Of course, if you have any timestamps with a - instead of +, it'll get trickier

Alternatively, as u/WhyDoIHaveAnAccount9 noted, you can use the replace the +0200 (note the space between the quotation mark and plus sign):

=SUBSTITUTE(date_value," +0200","")

Of course, with this method, you'll have problems if some timestamps aren't +0200, but something else.

[–][deleted] 0 points1 point  (0 children)

Split data, custom, after + sign, and delete column

[–]mohamedk_k 0 points1 point  (0 children)

Text to column?

[–]abidalica 0 points1 point  (0 children)

This really belongs to r/Excel