The CreatorCon Call for Content is officially open! Get started here.

Get today's date in a client script?

arobertson
Tera Guru

Hi All,

 

I'm trying to populate a read only field with today's date in the format of "28-May-2014" but notice that i cannot use any .gs functions?

1 ACCEPTED SOLUTION

akt_snow
Giga Expert

Hi Alex,



You refer to the below wiki link.


Set Current DateTime In Field - ServiceNow Wiki



Thanks,


Avneet


View solution in original post

10 REPLIES 10

solutioningnow
Giga Guru

Hi Alex,



you have to write a script include to get the current date time using gs.nowDateTime() function and make asynchronous ajax call in the client script. Use this script include in all processes in future also.



Please mark answer as correct/helpful, if it was helpful



Regards,


Solutioner


Logo.png


Enhance Knowledge NOW@ www.solutioningnow.com


http://www.solutioningnow.com/