Rows with duplicate values


Is it possible for me to use something to replace the screwed up time(the seconds is wrong it goes 19, 19, 21, 22, 23, 23, 23, 25 …) with the correct time of (19, 20, 21, 22, 23, 24 …) if not what can I do to fix the situattion

@JACOB_GEORGE welcome to the KNIME forum

You could

  • convert the timestamp string to timestamp
  • use the new duplicate row filter to mark the duplicates and make sure to use the correct sorting. Keep the original one and use row IDs
  • in the case of a double add one second to the timestamp (you might have to separate them and concatenate them back)
  • remove remaining duplicates (or do something else with them) cf. 14:31

And you could provide us with a sample to investigate further.

1 Like

@mlauber71
Hi thanks for the reply. I’m afraid the file is a csv so I’m not sure how to share a sample. Also it’s the minutes thats wrong not the seconds my bad.
What would be the formula I use for string to date time if the format I have is 2/2/2015 2:19:00 PM
I tried the duplicate row filter and it made it easier to understand the problem. I’m not sure exactly how do I add 1 minute to all the duplicate rows


this is what it looks like once i used the duplicate row filter

Hello @JACOB_GEORGE,

instead of repairing existing time (which is possible but seems complicated based on your data) how about “simply” creating new one using Create Date&Time Range node? Detect starting point, number of rows needed and use Interval option with 1m. Then append your row to existing data using Column Appender node.

Give it a try and if you’ll have any questions or need workflow example drop me a message. Welcome to KNIME Community!

Br,
Ivan

1 Like

There is this collection about date and time variables and one that deals with the AM / PM format

But you might have to toy around with the string.

To add one minute you could use the:

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.