Show current date and time

Hi i am Wanting my app to show the current date and time after the user clicks a button.

How do i do this?

Hi @Indisa,


Thank you

Yes! How is this done?

Here’s a video how this is done! You need the Arbitrary Javascript component made by Pragmaflow. Nowadays there’s a error when downloading components from their site. For download them you can follow these steps : Every new beginning comes from some other beginnings end - #48 by James_App_Maker And Pragmaflow created a video of this way too : Installing Adalo Github components walkthrough - YouTube

If you couldn’t do this send me a DM and I’ll add it for you!

Here’s the JS code.

var date = new Date();
var dd = String(date.getDate());
var mm = String(date.getMonth() + 1);
var yyyy = date.getFullYear();
var new_d = mm + '/' + dd + '/' + yyyy;
var time = new Date().toLocaleTimeString([], { hour: '2-digit', minute: "2-digit" , second:"2-digit" })
var combine = new_d + ' ' + time
return combine;

Thank you

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.