The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

How to get the time format without the date

frasaufrasau Member Posts: 9 Learner I
Hi, could you help me change the Data time format?

I have a dataset with "time" in polynomial form (00:00:00), I need to turn it into time.
I used generate attributes, but got the format "Jan 1 1970 12:00:00 AM CET"

Is there a way to have the Time format "HH: mm: ss"?

here is the xlm:
<?xml version="1.0" encoding="UTF-8"?><process version="9.7.000">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="9.7.000" expanded="true" name="Process">
    <parameter key="logverbosity" value="init"/>
    <parameter key="random_seed" value="2001"/>
    <parameter key="send_mail" value="never"/>
    <parameter key="notification_email" value=""/>
    <parameter key="process_duration_for_mail" value="30"/>
    <parameter key="encoding" value="SYSTEM"/>
    <process expanded="true">
      <operator activated="true" class="retrieve" compatibility="9.7.000" expanded="true" height="68" name="Retrieve dataset" width="90" x="179" y="34">
        <parameter key="repository_entry" value="//HEALTH_ANALYTICS/dataset"/>
      </operator>
      <operator activated="true" class="generate_attributes" compatibility="9.7.000" expanded="true" height="82" name="Generate Attributes (2)" width="90" x="380" y="34">
        <list key="function_descriptions">
          <parameter key="Test" value="date_parse_custom([Time],&quot;HH:mm:ss&quot;,&quot;it&quot;)"/>
        </list>
        <parameter key="keep_all" value="true"/>
      </operator>
      <connect from_op="Retrieve dataset" from_port="output" to_op="Generate Attributes (2)" to_port="example set input"/>
      <connect from_op="Generate Attributes (2)" from_port="example set output" to_port="result 1"/>
      <portSpacing port="source_input 1" spacing="0"/>
      <portSpacing port="sink_result 1" spacing="0"/>
      <portSpacing port="sink_result 2" spacing="0"/>
    </process>
  </operator>
</process>

Tagged:

Answers

  • Telcontar120Telcontar120 RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,635 Unicorn
    You can set the data type for that attribute to "time" rather than "date/time" and that should do the trick.

    Brian T.
    Lindon Ventures 
    Data Science Consulting from Certified RapidMiner Experts
  • frasaufrasau Member Posts: 9 Learner I
    thank you @Telcontar120!
Sign In or Register to comment.