C. Data Format Templates : Date Format Templates : Time Interval Format Templates : Guidelines for Using Time Interval Templates
 
Share this page                  
Guidelines for Using Time Interval Templates
Observe the following guidelines when using interval templates:
• There are 30.4375 days in a month and 365.25 days in a year.
The smallest unit specified is rounded up.
• Numbers requiring more than one digit use up preceding blanks or zeros.
If there are no preceding blanks or zeros to the left, the number expands to the right. A blank following a letter, word, or number is not used up by a succeeding number. You can line up columns of numbers by preceding them with an appropriate number of blanks or zeros.
• The word immediately following a number is made singular if the number is one, or plural if the number is zero or greater than one.
You can prevent this behavior by preceding the word with a backslash (\). Any character preceded by a backslash is printed as you enter it.
Examples of Time Interval Templates
The following table provides examples of time interval templates:
Format
Example Data
Output
1 year
3 years 5 mos 16 days
3 years
2 MONTHS, 3 DAYS
3 years 5 mos 1 days
41 MONTHS, 1 DAY
3
3 years 5 mos 16 days
1263
1 yr 3 day
1 yr 5 mos 16 days
1 yr 168 days
4 hours 6 seconds
23 hrs 8 mins 53 secs
23 hours 533 seconds
04:05 \hours
23 hrs 0 mins 53 secs
23:01 hours
3 days 4 hours
23 hrs 8 mins 53 secs
0 days 23 hours
1 yr 2 mos 3 days
200 yrs 11 mos 28 days
200 yrs 11 mos 28 days
1 yr 2 mos 3 days
5 yrs 1 mos 3 days
5 yrs 1 mo 3 days