I'm trying to extract the time from a Timestamp column as an integer.
For example, for a timestamp like "2017-06-15 12:30:55", I want to output an integer equal to 1230.
I have mainly 2 issues I need to understand:
First, I tried using the following function:
Code: Select all
TimestampToDecimal(DSLink2.TIMESTAMP, "%hh%nn")
This to me seem strange as the following function gets me the correct result as a decimal:APT_CombinedOperatorController,0: Caught exception from runLocally(): APT_ParseError: Parsing parameters "%hh%nn" for conversion "decimal=decimal_from_timestamp[%yyyy%mm%dd%hh%nn%ss](timestamp)": APT_Conversion_Decimal_TimeStamp: Invalid Format [%hh%nn] used for string_from_date type conversion.
Second issue is converting that from a Decimal to an Integer. I just call AsInteger on the above function, but instead I get a warning and value is set to 0.TimeToDecimal(TimestampToTime(DSLink2.TIMESTAMP), "%hh%nn")
Can someone help me understand what's going on?APT_CombinedOperatorController,0: Conversion error calling conversion routine decimal_from_time data may have been lost