How to insert a current date time from script to a DateTime field ?

Adil JEBLI
Mega Expert

Hi everyone,
I want to add a current dateTime to my dateTime field, in the wiki there is this way :

var gr = new GlideRecord('table_name');

gr.addQuery('some_query');

gr.query();

gr.my_dateTime_field = gs.nowDateTime();

gr.update();

but it doas not work for me !

doas anyone know how to fix this issue ?

thank you

13 REPLIES 13

is that possible ?, this is my be interesting for others


Abhinay Erra
Giga Sage

I am not sure. But I believe you will see a option to make this as question when you open the thread directly not from the inbox view.


It is not possible after 15 min from the creation of the discussion im so sorry 😕


Abhinay Erra
Giga Sage

Not a problem. I am glad you got your question answered.