Difference between revisions of "Format Time (LogiX node)"
(Created page with "<languages></languages> <translate> <!--T:1--> {{Infobox Logix Node | Name = Format Time | Image = noframe | 128px | 'Format Time' LogiX node ...") |
(Marked this version for translation) |
||
Line 17: | Line 17: | ||
This node takes a <code>DateTime</code> input, three <code>bool</code>s as input, and an <code>IFormatProvider</code> as input, and it outputs a string. | This node takes a <code>DateTime</code> input, three <code>bool</code>s as input, and an <code>IFormatProvider</code> as input, and it outputs a string. | ||
+ | <!--T:6--> | ||
The <code>Use24HourClock</code> input toggles whether the time is represented as 24 hours or 12 hours with AM and PM. The <code>ShowSeconds</code> input toggles whether the output shows the seconds place. The <code>ShowMilliseconds</code> input toggles whether the output shows the milliseconds place. By default, all of these values are <code>true</code>. | The <code>Use24HourClock</code> input toggles whether the time is represented as 24 hours or 12 hours with AM and PM. The <code>ShowSeconds</code> input toggles whether the output shows the seconds place. The <code>ShowMilliseconds</code> input toggles whether the output shows the milliseconds place. By default, all of these values are <code>true</code>. | ||
+ | <!--T:7--> | ||
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. | 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. | ||
Line 24: | Line 26: | ||
In the following image, the current date and time from [[UtcNow (LogiX node)|UtcNow]] is being converted to 24-hour time with the seconds and milliseconds places shown. | In the following image, the current date and time from [[UtcNow (LogiX node)|UtcNow]] is being converted to 24-hour time with the seconds and milliseconds places shown. | ||
+ | <!--T:8--> | ||
[[File:Logix Example FormatTime.png|600px]] | [[File:Logix Example FormatTime.png|600px]] | ||
Revision as of 20:24, 11 September 2022
Format Time | ||
---|---|---|
Inputs | ||
Float | Time | |
Int | DecimalPlaces | |
IFormatProvider | FormatProvider | |
Outputs | ||
String | Str |
The Format Time node takes a date and time input and formats the time as a string, with various flags to customize its output.
Usage
This node takes a DateTime
input, three bool
s as input, and an IFormatProvider
as input, and it outputs a string.
The Use24HourClock
input toggles whether the time is represented as 24 hours or 12 hours with AM and PM. The ShowSeconds
input toggles whether the output shows the seconds place. The ShowMilliseconds
input toggles whether the output shows the milliseconds place. By default, all 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, the current date and time from UtcNow is being converted to 24-hour time with the seconds and milliseconds places shown.
Node Menu
String / Quick Format | ||||||
---|---|---|---|---|---|---|
Back | Format Date | Format Time | Format Timespan | To Time String |