How to get the time format without the date
frasau
New Altair Community Member
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],"HH:mm:ss","it")"/>
</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:
0
Answers
-
You can set the data type for that attribute to "time" rather than "date/time" and that should do the trick.
1 -
thank you @Telcontar120!0