Data with mixed date format

Hello

I have multiple csv all same structure but for some reason some csv will have time format am/pm and others will have 24-hr format… Can anyone suggest how to manipulate so all format will be am/pm?

Thanks,

1 Like

Hi @gogon,

welcome to the KNIME Community Forum :slight_smile:

KNIME Analytics Platform has a special data type for date and time information. I would suggest to split your data set into two subsets using a Row Splitter node:

  • Rows with am/pm format
  • Rows with 24h format

Next, you can convert the string information into the date&time format using the String to Date&Time node and concatenate the two subset using a Concatenate node.

If you need your time information in string format you can also convert it back using the Date&Time to String node.

Here is a little workflow with the described steps

Please let me in case of any further questions
Kathrin

3 Likes

thank you! I spent hours last night and did exactly what you wrote… the trick is splitting them up and do the time format separately

2 Likes

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