https://docs.servicenow.com/bundle/washingtondc-api-reference/page/app-store/dev_portal/API_reference/GlideDateTime/concept/c_GlideDateTimeAPI.html
servicenow date/time column store date as UTC then display to user on browser timezone
when writting values to those columns,
need to use
new GlideDateTime("2023-01-01 12:00:00");
if no timezone in string, it will be treated as UTC
if timezone is present in string, it will be converted to UTC
var gdt1 = new GlideDateTime("2023-07-04T12:08:56.235-0700");
var gdt2 = new GlideDateTime(gdt1);
gs.info(gdt1);
gs.info(gdt2);
helpful date time function :
https://www.learnnowlab.com/glide-system-script/
null query :
https://www.servicenow.com/community/now-platform-forum/how-to-query-out-fields-that-have-an-empty-value-with/m-p/1116429
No comments:
Post a Comment