Can you add a date column and a time column together to create a new column as one?
Solved! Go to Solution.
Hi @VeronicaElse ,
If both these columns are of the string datatype currently, you can do a string concat using the formula tool. The formula would be 'Date_String'+" "+'TIme_String' . Post this you can DateTime parse tool to convert the string into a datetime datatype.
Do let me know if this helps.
Best,
Jagdeesh Narayanan
Hello,
Thanks for replying!
I inputted the two fields into the formula provided (they were both VString) and added the DateTime parse tool to convert to datetime datatype and my output is NULL.
Any reasons why?
can you please share sample of the two strings you are using?
I ask so that i can get an idea of the format within the string.
Thanks for the example--I am super nice to Alteryx so I am sure it is something I typed wrong. I still got NULL.
I copied what you did and for DATE I used the date of request and for TIME I used the time of the request---was that correct? those are the 2 I need to add together.
I am referring the format of the actual string. For eg. is the date string formatted as 12-12-2020 or 12/12/2020 or any other format.
Similarly the format for the time string. I ask because you are getting the NULLS because of the format difference.
Best,
Jagdeesh
date 2020/12/30 time 10:53:31
Please find attached a sample workflow which converts this format.
Do let me know if this helps.
Best,
Jagdeesh