Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
ALTER.NEXT:

Join us on Dec 2 for a half-day virtual analytics + data science event!
US & CA customers only

SAVE YOUR SPOT
It's the most wonderful time of the year - Santalytics 2020 is here! This year, Santa's workshop needs the help of the Alteryx Community to help get back on track, so head over to the Group Hub for all the info to get started!
SOLVED

Increment seconds on date/time

Highlighted
7 - Meteor

I have the need to increment the seconds on a date/time field if an ID is the same.  An example of the data would include

 

 

IDDATE/TIME
32015-06-03 00:00:00
32015-06-03 00:00:00
52014-01-15 00:00:00
52014-01-15 00:00:00
52014-01-15 00:00:00

 

The end result I'm looking for is...

 

IDDATE/TIME
32015-06-03 00:00:00
32015-06-03 00:00:01
52014-01-15 00:00:00
52014-01-15 00:00:01
52014-01-15 00:00:02

 

I figured I would use the multi-row tool where I could group by the ID and then use an expression to add the increment.  However I cannot figure out the format of the expression I should use. 

 

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi @G_WOLAK 

 

You could use the Tile Tool for that.

 

TileTool.PNG

 

Tile Tool with Unique Method on ID.

 

Use Formula Tool to add the seconds - DateTimeAdd([DATE/TIME],[Tile_SequenceNum] - 1, "seconds")

 

WF attached.

 

Cheers,

Highlighted
7 - Meteor

Absolutely fantastic!  That did it.  Thanks!

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi @G_WOLAK,

 

Just to show you there is also always more than one way to solve a problem this is the multi row formula route you were talking about taking. I've attached the workbook for you to download if needed.

 

image.png

 

If this solves your issue please mark the answer as correct, if not let me know!

 

Regards,

Jonathan

Highlighted
7 - Meteor

@Jonathan-Sherman,

 

That too also worked.  Glad to know I had the right idea in mind.  Good to know there are two ways to go about this.

 

Thanks!

Labels