This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!Submit Feedback
Here is a new challenge for this week. The link to the solution for last week’s challenge is HERE.
The use case:
We received some text data and that includes an embedded line-feed character.
The objective is to remove the new line character, convert the date-time string to a date-time formatted field and then do some renaming per the sample output.
Good luck, I look forward to your feedback.
Here is another approach..
@kconner - Nice solution! If you'd ever like the share the workflow file, the weekly challenge can now have files attached in responses!
I realise I've done this following the introduction of the data cleansing tool, but I think that's worth showcasing, so:
I simply fed the fields into the "Data Cleansing" tool, removed line breaks, then converted the date using the "Date Parse" tool. Then I simply renamed the columns appropriately and dropped the old date field.
Original solution that I did was the same as provided - but when I looked at the answers provided by @MarqueeCrew and @mceleavey, wanted to add them as well to experiment and try them out, so all 3 are included.
Note: Only the solution from @mceleavey deals with the line-break gracefully and doesn't smash the words together at the end of the first line, and beginning of the next.
PS. I noticed in the solution output in the "Mary had a little lamb" poem that the space between "lamb" and "whose" was removed, I'm assuming due to leaving the box checked in Data Cleansing to remove white space. In this case, based on the poem output, I decided to leave that box unchecked so that the poem reads correctly with the space between the words that were initially separated by the newline character.
UPDATED: Aaaaaand since i didn't read any of the prior comments before posting my solution, I see now that @mceleavey & @SeanAdams already figured that out. :) Soooo I'm a bit late to the party. But at least I got there. And I usually bring cookies..