Android alarm and openHAB2

OK, I found the misstake…
the item hast to be of number type and not DateTime.

But can eventually someone tell me how to convert the time which is given in ms into an normal Time/date fomat to show it in my sitemap and/or HABPanel?

Date alarm = new Date((long)timeStamp);

Hi!
Tell me how to use it? what for?
Thanks!

Can you please tell me how to use it? Im really pretty new to OH and try to learn :sweat_smile:.

My solution would be to create a new Item with DateTime as type called “AlarmClockDT”.
Also I would create a rule that would look something like this:

rule "Alarm convert"
when 
AlarmClock changed
//Rule gets triggerd when AlarmClock is changed by the app
then
AlarmClockDT.setCommand(Date = new Date((long)AlarmClock))
end

Everytime the App sends a new time to the Item AlarmClock the rule will update the Item AlarmClockDT with the converted value.
The Item AlarmClockDT can than be used in a sitemap or HAB Panel, correct?

I found a multitool for detecting events on the phone, i.e. alarms and sent it over to openHAB using MQTT as protocol. Maybe a bit technical solution but simple in design and works for all kind of alarm-apps.