Before | AFTER | ||||
Time | Date | Time | Date | ||
13:01:50 | 13:01:50 | 23/10/2017 | |||
13:01:51 | 13:01:51 | 23/10/2017 | |||
13:02:29 | 13:02:29 | 23/10/2017 | |||
13:02:34 | 13:02:34 | 23/10/2017 | |||
13:02:35 | 23/10/2017 | 13:02:35 | 23/10/2017 | ||
7:39:33 | 7:39:33 | 24/10/2017 | |||
7:41:32 | 7:41:32 | 24/10/2017 | |||
7:43:33 | 7:43:33 | 24/10/2017 | |||
7:49:32 | 24/10/2017 | 7:49:32 | 24/10/2017 | ||
9:13:29 | 9:13:29 | 24/10/2017 |
I have the above situation (BEFORE) and I want to go to the (AFTER) situation. I am trying to using a multi-row tool. But not going anywhere.
IF
(ISNULL(TimeStamp)
and TIME<=[Row-1:Time]
AND TIME>00:00:00)
THEN [Row-1:TimeStamp]
ELSEIF
(ISNULL(TimeStamp)
and TIME>[Row-1:Time])
THEN
DateTimeAdd(TimeStamp,-1,"days")
ELSE [TimeStamp]
ENDIF
Could you please help me?
Thanks
Solved! Go to Solution.
It's better to work from top to bottom. Try sorting in reverse order and apply multirow formula
I think @gnans19 is correct here, reversing the sort first will make things easier. So your workflow will end up looking something like this:
I add a RecordID to maintain the original order, sort, copy down dates into the null rows, sort back to the original, and drop the ID field. Note that in your sample you have 24/10/2017 on the row next to the last one. I'm assuming that is either a typo and should be on the last record, or that the last record belongs to the next date (which isn't included in the sample data) and the AFTER portion has a typo. If that's not true, you might need to get a little fancier with your Multi-Row Formula tool.
Hope it helps!