Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Increment seconds on date/time

G_WOLAK
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. 

 

4 REPLIES 4
Thableaus
17 - Castor
17 - Castor

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,

G_WOLAK
7 - Meteor

Absolutely fantastic!  That did it.  Thanks!

Jonathan-Sherman
15 - Aurora
15 - Aurora

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

G_WOLAK
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