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.
Debating whether or not to upgrade to the latest version of Alteryx Designer?
I have a coloumn with below values , current Coloumn type is V-String
These values are showing time. Like 0 hour, 0M, 17 seconds (First value.)
My Objectove is to convert this cell value to a new coloumn that shows timestamp.
I was thinking to remove first two ch, split coloumn after H, M to get hours and minutes and seconds. Then remove last CH S using REGEX but I don't know how to use it.
Then bring everything together to create time stamp.
Can you please assist me,
Go to Solution.
Go to Solution.
You can follow the below steps to achieve the result. I have attached the completed workflow.
1) Use Text to Columns to split the data
2) Use RegEx replace function in formula to strip off text. So only numbers remain
3) Use Date time to get the required output
In Designer: open the example for the tool RegEX:
Then go there: https://help.alteryx.com/current/boost/syntax_perl.html you will need to understand that type of syntax for this tool.
In your case the pattern of your string is: (PT)(.*)(H)(.*)(M)(.*)(S)
Each group under () is a field .* means any number - it will create 7 fields.
Field 2 contains hour, Field 4 contains Minutes, Field 6 contains seconds
Concatenate using Formula Tool and convert to time stamp using DateTime tool
Sample workflow as below.
Thanks Poonraj for providing a very simple solution.
Thanks Aloc, great simple logic. THis provides me a perfect solution.
Great way of solving this issue. Great solution.
Thanks for support,