Splitting time and date

AliArbab94
AliArbab94 New Altair Community Member
edited November 5 in Community Q&A
Hi experts,
I wanted to split the date and time and put them into the separate columns. My date format is like "Tue Oct 14 21:59:59 CDT 2014". 
Does anyone have any idea how can I do it?

Answers

  • Telcontar120
    Telcontar120 New Altair Community Member
    There are a lot of options here.  One easy one is to copy the combined date/time attribute with Generate Copy, and then change it to nominal with Date to Nominal, and then change it back using Nominal to Date---and you can use that to set one version "Date" and the other version "Time" and it will display only the relevant parts.
  • Luxtor
    Luxtor New Altair Community Member
    Mind to be a little bit more specific please? I'm new to Rapidminer and don't really get your explanation. If I do it like that, what I'm able to do is basically separate both Date and time and get only one of them.. What if I just want to strip the month as a new feature? What would be the process? (checking options in parallel while asking here to optimize time)
    Thanks!
  • nn_here
    nn_here New Altair Community Member
    Hi, Luxtor  Even i have the same requirement, to segregate the date column in to 3 different new columns. Can you tell me if you were able to find a way out for the same..

    Thanks and regards!
  • Caperez
    Caperez Altair Community Member
    Hi @nn_here
    please find attached a sample process to extract date and time from an attribute. 

    Best, 

    Cesar
  • nn_here
    nn_here New Altair Community Member
    Thankyou  for the help provided. :) Though I could get the months using -date_get([Date], DATE_UNIT_MONTH,"Asia/Kolkata") +1,glad for sharing a new method for the same purpose.
    Thanks and regards,
    nn_here