Use fractional seconds in DateTime formats
Fractional seconds provide sub-second precision in DateTime values, which is essential for high-accuracy use cases such as log analysis, auditing, and high-speed system monitoring.
In Torq, DateTime values are handled as strings and support fractional seconds formatting.
Control fractional precision
Use %f in your format string to return fractional seconds. By default, %f returns nanoseconds (9 digits).
To control the precision, specify the number of digits between % and f.
It’s important to match the expected precision of the target system or database to ensure compatibility across your workflow.
Supported formats
Fractional unit | Digits | Format |
Decisecond | 1 |
|
Centisecond | 2 |
|
Millisecond | 3 |
|
Microsecond | 6 |
|
Nanosecond | 9 |
|
