Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Adding a time column to a date column

nlgenin
7 - Meteor

Hello, Alteryx Gurus!

I need you guys to help me out with a simple task.

I'm starting to use Alteryx and I need to add a column which has the Time of a specific date, to that date column.

 

nlgenin_0-1626275874252.png

So what I need is a new column with date and time together.

 

I tried the following, but it says the [time] field is not in number, so I could try to convert it to number, right? And then apply the formula

 

DateTimeAdd(DateTimeParse([date],"%y-%m-%d %H:%M:%S"),[time],"seconds")

 

Thanks!

5 REPLIES 5
atcodedog05
22 - Nova
22 - Nova

Hi @nlgenin,

 

Can you share the data for this.

nlgenin
7 - Meteor

aeg               date            time

A0204 5201 2021-01-13 14:26:29
A0204 5201 2021-01-13 14:26:31
A0204 5201 2021-01-13 14:26:33
A0204 5201 2021-01-13 14:26:35
A0204 5201 2021-01-13 14:26:37
A0204 5201 2021-01-13 14:26:39
A0204 5201 2021-01-13 14:26:41
A0204 5201 2021-01-13 14:26:43
A0204 5201 2021-01-13 14:26:45
A0204 5201 2021-01-13 14:26:47
A0204 5201 2021-01-13 14:26:49
A0204 5201 2021-01-13 14:26:51
A0204 5201 2021-01-13 14:26:53
A0204 5201 2021-01-13 14:26:55

nlgenin
7 - Meteor

I can't share all the data, because it is operational... I'm sorry does it in a table serve you? it has more info than Date and Time

atcodedog05
22 - Nova
22 - Nova

Hi @nlgenin 

 

You can do something like this.

 

Workflow:

atcodedog05_0-1626276694379.png

 

Hope this helps : )

Christina_H
14 - Magnetar

If your date and time are strings you could just use a formula tool to concatenate them, [date] + " " + [time], then use a DateTime tool to convert them to a datetime data type if required.  If they are already date/time types you could convert them to strings first, ToString([date]) + " " + ToString([time])

Labels
Top Solution Authors