Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

How to set the logged in user date or date/time format with the help of client scripts?

Shantharao
Kilo Sage

Hi All,

How to set the date time with the help of client scripts?

Is it possible to ser date and time without using Ajax call in the client script?

 

Thanks

 

1 ACCEPTED SOLUTION

Shantharao
Kilo Sage

With this simple client script code we can set date and time to the Date/Time type field or variable

function onLoad() {
var dt = formatDate(new Date(), g_user_date_time_format);
alert(dt);
g_form.setValue("u_date", dt);
}

View solution in original post

5 REPLIES 5

Thanks for the solution. I am new to NOW platform and the code snippet above worked for me.