Format Timespan (LogiX node)

From Neos Wiki
Jump to navigation Jump to search
Other languages:
English
Format Timespan
'Format Timespan' LogiX node
Inputs
  TimeSpan TimeSpan
  Bool ShowSeconds
  Bool ShowMilliseconds
  IFormatProvider FormatProvider
Outputs
  String Str

The Format Timespan node takes a timespan input and formats the value as a string with various flags to customize its output.

Usage

This node takes a TimeSpan input, two bools as input, and an IFormatProvider as input, and it outputs a string.

The ShowSeconds input toggles whether the output shows the seconds place. The ShowMilliseconds input toggles whether the output shows the milliseconds place. By default, both of these values are true.

The output format defaults to an Invariant Culture, and it is recommended to not be changed unless the output is meant to be seen to other users and you are not parsing the output in any way.

Examples

In the following image, Format Timespan is used to display the difference between 12:30 and the current time.

Logix Example FormatTimespan.png

Node Menu

String / Quick Format
Back Format Date Format Time Format Timespan To Time String