🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Date to Nominal Function

User: "rowan_g"
New Altair Community Member
Updated by Jocelyn
Hi,

Not sure if this has been requested. A Date-to-Nominal function for use in the Generate Attributes operator would be awesome!

Thanks for all the great work! Rapidminer is a fine piece of software! Keep it up1

Find more posts tagged with

Sort by:
1 - 2 of 21
    User: "Nils_Woehler"
    New Altair Community Member
    Hi,

    there are already multiple possibilities to accomplish this.

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.3.009">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.3.009" expanded="true" name="Process">
        <process expanded="true">
          <operator activated="true" class="generate_data_user_specification" compatibility="5.3.009" expanded="true" height="60" name="Generate Data by User Specification" width="90" x="112" y="30">
            <list key="attribute_values">
              <parameter key="nominal_date" value="&quot;2007-08-09 12:37:56&quot;"/>
            </list>
            <list key="set_additional_roles"/>
          </operator>
          <operator activated="true" class="generate_attributes" compatibility="5.3.009" expanded="true" height="76" name="Generate Attributes (2)" width="90" x="246" y="30">
            <list key="function_descriptions">
              <parameter key="nominal_to_data_old" value="nominal_date"/>
            </list>
          </operator>
          <operator activated="true" class="nominal_to_date" compatibility="5.3.009" expanded="true" height="76" name="Nominal to Date" width="90" x="380" y="30">
            <parameter key="attribute_name" value="nominal_date"/>
            <parameter key="date_type" value="date_time"/>
            <parameter key="date_format" value="yyyy-MM-dd HH:mm:ss"/>
          </operator>
          <operator activated="true" class="generate_data_user_specification" compatibility="5.3.009" expanded="true" height="60" name="Generate Data by User Specification (2)" width="90" x="112" y="165">
            <list key="attribute_values">
              <parameter key="nominal_date" value="&quot;2007-08-09 12:37:56&quot;"/>
            </list>
            <list key="set_additional_roles"/>
          </operator>
          <operator activated="true" class="generate_attributes" compatibility="5.3.009" expanded="true" height="76" name="Generate Attributes" width="90" x="246" y="165">
            <list key="function_descriptions">
              <parameter key="date" value="date_parse_custom(nominal_date, &quot;yyyy-MM-dd HH:mm:ss&quot;, &quot;de&quot;)"/>
            </list>
          </operator>
          <connect from_op="Generate Data by User Specification" 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_op="Nominal to Date" to_port="example set input"/>
          <connect from_op="Nominal to Date" from_port="example set output" to_port="result 1"/>
          <connect from_op="Generate Data by User Specification (2)" from_port="output" to_op="Generate Attributes" to_port="example set input"/>
          <connect from_op="Generate Attributes" from_port="example set output" to_port="result 2"/>
          <portSpacing port="source_input 1" spacing="0"/>
          <portSpacing port="sink_result 1" spacing="18"/>
          <portSpacing port="sink_result 2" spacing="90"/>
          <portSpacing port="sink_result 3" spacing="0"/>
        </process>
      </operator>
    </process>
    Best,
    Nils
    User: "rowan_g"
    New Altair Community Member
    OP
    Sorry - didn't realise date parse custom was the operator to use.

    Thanks!