Modifying Date Time Format

Modify result when it is not greater than days.

In result 7d 1h 35m 28s

If there is no d
just h m s

Can you help me?

Do you have an example date1 and date2 and how the result should look like in the end?

The clock component already offers several methods… no need for an extension… see the guide

Taifun

Dear friend,

When the result is greater than one day, it should appear in the result

ex. 1d 12h 23m 12s

otherwise just the hours without the day

ex. 12h 23m 12s

So how does it appear currently in this case?
Taifun

Friend

There is a waiting area in the app

When you go on hold, your entry is recorded, when you leave, your exit is recorded, thus totaling how long you stayed there.

Sometimes it may pass during the day, hence this math, but when it doesn’t pass, I would just like the hours that it was there.

Unfortunately you do not show us an example what you get currently? My guess, it starts with 0d ?
Just check, if the result starts witv 0d and remove the first 3 characters from the result

Taifun

And that my friend

You again show us a working example but not an example which is not working

Taifun


Dear friend,

just with explanations you posted I managed,

Thanks.

Here’s a simple solution…

Ok, you got it finally

Taifun

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.