In some cases, it might be useful to display numerical value as date or time duration.
This format can be set in the indicator settings.
Following syntax can be used:
- duration(pattern) - takes the input number as seconds
- durationM(pattern) or durationMinutes(pattern) - takes the input number as minuets
- durationH(pattern) or durationHours(pattern) - takes the input number as hours
- durationD(pattern) or durationDays(pattern) - takes the input number as days
Pattern:
Letter | Date or time component | Example |
---|---|---|
H | Hour in day | 0 |
m | Minute in hour | 30 |
s | Second in minute | 55 |
D | Day in year | 123 |
Examples:
Format | Example |
---|---|
durationH(HH:mm:ss) | 18:34:54 |
durationH(dd:HH) | 00:21 |
durationD(d 'days' HH 'hours' mm 'minutes' ss 'seconds') | 2 days 12 hours 25 minutes 33 seconds |
Overview
Content Tools