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 to display date type variable in Months and Year format on Service portal

Are Kaveri
Tera Contributor

Hello ,

 

I have below requirement.

 

we have a Record producer with the following variable called Used life.

Used life : Date type variable.

 

I need this variable to display only Month and year not days.

 

Any solution please share.

 

4 REPLIES 4

Samaksh Wani
Giga Sage

Hello @Are Kaveri 

 

use this:-

 

date.getFormatBy('MM-YY');

 

Please mark my Solution as Accept and Give me thumbs up, if you find it helpful.

 

Regards,

Samaksh

@Samaksh Wani  where to add above conversion?

Hello @Are Kaveri 

 

You can use Business rule and add it there.

Hi @Samaksh Wani 

 

I tried using Business rule it was not working. can you provide sample script so that i can do it accordingly.