I have just installed OH4 and get the date like: 2024-06-23T23:36:30.396238140+0300 - get normal date and time for Xiaomi

I have just installed OH4 and get the date like: 2024-06-23T23:36:30.396238140+0300

How set just date and time in sitemap?

Search should have guided you here

Go to the item and then select metadata and select State description.

Put put this into the State description:

%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1tS

It will look like this:
2024-06-24 16:27:49

Perfect ! thanks a lot for clear answer !

And if you want to show that on a page or somewhere you would use the displayState rather than just the state.

Like this:
items.Gate_opener_status_lastupdate.displayState

If you just use the state like this: items.Gate_opener_status_lastupdate.state instead of displayState you would see the unformatted date like how you were seeing it orginally.

He ist talking about a Sitemap :wink:

Oh well if he wants to make an overview page or widget then that will be how to do it. :smiley: I didn’t see the sitemap part only the screenshot of the item.

I don’t use sitemaps. No need with the UI and the phone app. Much better.

That should work in sitemaps anyway I think? I haven’t used sitemaps for ages.

No, you explicitly define the pattern in the Sitemap, that’s why I linked the other post.