Adding a date and time together
- 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
Can you add a date column and a time column together to create a new column as one?
Solved! Go to Solution.
- Labels:
- Date Time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- 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
here they are
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
date 2020/12/30 time 10:53:31
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Please find attached a sample workflow which converts this format.
Do let me know if this helps.
Best,
Jagdeesh
