Only Date needed


I am trying to write a painless script code where I got a date in the format like: Fri Aug 16 11:20:43 EDT 2019, but all I need is only like this ( 8/16/19 ).

I am using "new Date() " in my script which resides in html, something which looks like below
op+="Yesterday's Service usage date:" + new Date()+ "";


Did you give field formatters a try?

Hopefully that should help.


what I was trying to do is execute a "Post" painless script with, all I need is yesterday's date

How can I get that?

I tried which you said, its asking to fill " script" field and still If I passed something in that field, still I am not able to find the solution.

It would be grateful, if you could elaborate the solution.

ganga reddy

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.