OK, here’s an expanded, slightly restructured version of your formula that shortens the elapsed time by 30 minutes for all measured elapsed times equal to or greater than 4 hours’ duration. If both `{Přihlášen}`

and `{Odhlásit}`

are set, time is measured from `{Odhlásit}`

to `{Přihlášen}`

, subject to that possible 30-minute reduction; if only `{Odhlásit}`

is set, measured time is that between `{Odhlásit}`

and `NOW()`

.

You can mark, copy, and paste the entire formula — indentations included — into the formula configuration box of a formula field; Airtable will strip out the indentations and formatting correctly.(In addition, the block of text has been tagged as ‘code’, so single and double quotes maintain the proper encoding.)

```
IF(
{Přihlášen},
ROUND(
DATETIME_DIFF(
IF(
{Odhlásit},
IF(
DATETIME_DIFF(
{Odhlásit},
{Přihlášen},
'hours'
)>=4,
DATEADD(
{Odhlásit},
-30,
'minutes'
),
{Odhlásit}
),
IF(
DATETIME_DIFF(
NOW(),
{Přihlášen},
'hours'
)>=4,
DATEADD(
NOW(),
-30,
'minutes'
),
NOW()
)
),
{Přihlášen},
'hours'
),
0
)&" hrs "&
ROUND(
MOD(
DATETIME_DIFF(
IF(
{Odhlásit},
IF(
DATETIME_DIFF(
{Odhlásit},
{Přihlášen},
'hours'
)>=4,
DATEADD(
{Odhlásit},
-30,
'minutes'
),
{Odhlásit}
),
IF(
DATETIME_DIFF(
NOW(),
{Přihlášen},
'hours'
)>=4,
DATEADD(
NOW(),
-30,
'minutes'
),
NOW()
)
),
{Přihlášen},
'minutes'
),
60
),
0
)&" min"
)
```

I made one material change from your version: If `{Přihlášen}`

has not been set, the routine returns a `BLANK()`

field rather than `'0'`

. I find this a more aesthetically pleasing response, personally — but if you wish to return to the original functionality, replace the last two lines in the formula with these three:

```
)&" min",
'0'
)
```