Date field in Background script is showing Undefined

Aldo Andrade1
Giga Expert

Hi Community,

When running a background script gs.info pointing to a Date field that has info, for some reason the resoult is Undefined,

Do anyone know how to take the Date info from a field in background script?

example with error: gs.info("Date is: " + gr.end_date); 

 

Thanks!

1 ACCEPTED SOLUTION

Jaspal Singh
Mega Patron
Mega Patron

Can you share the complete script.

If you simply want to check date try below

var dateis=new GlideDateTime();
gs.info(dateis);

 

View solution in original post

2 REPLIES 2

Jaspal Singh
Mega Patron
Mega Patron

Can you share the complete script.

If you simply want to check date try below

var dateis=new GlideDateTime();
gs.info(dateis);

 

sachin_namjoshi
Kilo Patron
Kilo Patron

Try below

 

 gs.info("Date is: " + gr.end_date.getValue()); 

 

Regards,

Sachin