Openhab: How to show only the day from a "date-String"

Hi,

i get a String from the xiaomi binding:
String RoborockVacuumS5MaxLastEnd “Last Cleaning End time [%s]”

Wenn i show this value in a DummyWidget in habpanel, i get: “2020-09-24T17:33:09.000+0200”
It is possible to show only the date. Like 24.09 ? I couldn’t do it with “Format”.

Thanks
Marcel

Welcome to the openHAB forum :wave: :wave: :wave:

Using the search function of this forum like this, I got this Tutorial thread.

Thanks for your reply.

In your tutorial thread is the datatype DateTime. My datatyp is String.

I Found this this topic

He have the same Question and received no replies .

I suppose you might consider converting your string to date time of some kind, so that you can format it as you want.

Jodatime is deprecated…

In unterstand, that i have to converted the string.
But i dont know how. I have only so far creat items and add it in habpanel.
Where can i converted?

Shouldn’t e.g. work it with angularjs.
With the string from your example it would look like https://plnkr.co/edit/GSvV2uqcRE2aK3MZ?preview
What’s missing then is how to integrate that into habpanel. As far as I can see examples are shown here: Convert seconds to Hours:Minutes:Seconds in HabPanel?

Have you tried to just change the type to DateTime?

I change it in my .item file to datetime. i got only null. i changed it to String again. Now i get null too.

That’s the way it will stay until the next time the vacuum updates it.

I don’t know much about front-end technologies like angularjs.

How i get you script snippet in habpanel?
As already mentioned. So far I have only created items (in visual basic) and displayed them with existing widgets in habpanel.

I found this to learn to create own widgets.
Probablyi have to create a template-widget with the script

Hi
Have you found solution to show normal date ? How to do it ?