Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

how we can use getByFormat() in scoped application

Pothu Ravi Kuma
Tera Contributor

how we can use getByFormat() in scoped application. iam using date field, i need to extract that date in "YYYY-MMM-dd" format

1 ACCEPTED SOLUTION

Allen Andreas
Tera Patron

Hello,

getByFormat() works in scoped application. Example:

var gd = new GlideDate(); 
gd.setValue('2021-04-21');
gs.info(gd.getByFormat("YYYY-MMM-dd"));

find_real_file.png

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

1 REPLY 1

Allen Andreas
Tera Patron

Hello,

getByFormat() works in scoped application. Example:

var gd = new GlideDate(); 
gd.setValue('2021-04-21');
gs.info(gd.getByFormat("YYYY-MMM-dd"));

find_real_file.png

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!