Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Check out our powerful new search update! You can read more here. Please let us know if you have any feedback by creating a topic here.
SOLVED

Increment seconds on date/time

Highlighted
Meteoroid

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
Meteoroid

Absolutely fantastic!  That did it.  Thanks!

Highlighted
Alteryx 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
Meteoroid

@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