Current Date And Time

Hi Team, I have to show the current date and time in my application while opening the application. I tried for this but i unable get the proper syntax, if any have any idea on this please share let to me. This will helpful for my application.

Thank you.

Hi @Ramakrishna,

You can use the Date browser API to get that:

const date = new Date().toLocaleString();
console.log(date);

// it will output something like this
// "09/08/2022, 2:35:56 AM"

From there you can use it on a UI text element of yours for example, to have it show in your interface.