Want to truncate a field
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I am a newbie. I am not a programmer. I can do this in Excel, but the boss wants to use Alteryx. So here I am. My data is pulled from a HUGE data set that is has been parsed by a programmer into applicable fields for our use. We are trying to set up a workflow to have the redundant tasks are automatic. Simple... (NOT!)... anyway I need to truncate one of the fields. An example in the column is (identifying information replaced with x's for the letters:
1/17/2024 10:00:00 AM Txx Sxx Pxxx Txxx12 xx
All I want is the date. How do I do this? Help please.
rene
Solved! Go to Solution.
- Labels:
- Best Practices
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @rhearns1, if this field is consistently in this format then you could use something like this:
The inner FindString() function looks for the first instance of a space.
The outer, Left() function then takes the first N characters of the string, where N is the index found by the FindString() within.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Shanker, Thank you. But the results included the time for which I do not want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This worked wonderfully!!!!! THANK YOU!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @rhearns1 ,
Hope you are well.
You can simply use DateTime Function. Configure it to Convert "String to Date/Time Format" and specify the format of the incoming string. This will give you Date part.
Solution attached for your reference. Please let me know if I have further questions.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I would like to thank all for the replies. I wasted 1 hour trying to figure this out!!!!! 👍
r
