Hello everybody,
When somebody is ringing the doorbell, I’ll trigger an event which sends an e-mail. The subject contains the actual time but the format is not always OK.
When the mail is send at, for example, 13:30hr the subject contains: “Thuis aangebeld om 13:30 uur aangebeld” which is OK.
When the mail is send at, for example, 13:01hr the subject contains: “Thuis aangebeld om 13:1 uur aangebeld” which is not OK.
How can I make the ‘minutes’ always displaying two characters?
This is the code I’d use:
sendMail("info@mydomain.com", "Thuis aangebeld om " + now.getHourOfDay + ":" + now.getMinuteOfHour + "uur", "Bezoeker heeft om " + now.getHourOfDay + ":" + now.getMinuteOfHour + "uur aangebeld", attachmentUrlList)
I hope somebody can help me.
Regards Jaco