Skip to content
ptrb edited this page May 29, 2013 · 1 revision

Name and Parameters

tm_duration( PostTIME ) : text

Description

This function returns the duration of one object as ISO8601-duration-string. The duration of an instant is by definition zero.

Examples

SELECT tm_duration('2013-5-30T8/2013-5-30T12:45');
-- result
'PT4H45M'

Processable Objects

| CAL | TCS | ORD ---|---|---|--- TM_Instant | ✔ | ✔ | ✗ TM_Period | ✔ | ✔ | ✗ MultiInstant | ∼ | ∼ | ✗ MultiPeriod | ∼ | ∼ | ✗ RegularMultiInstant | ∼ | ∼ | ✗ RegularMultiPerid | ∼ | ∼ | ✗ ✔ : Processable

✗ : Call will cause an error

∼ : Callable without error, but returns only a pseudo result

Related functions

tm_duration_dec_day


List of SQL Functions