Display Quarter number based on date in Year

chanikya
Kilo Sage

1.Quarter number

2.Current number

Display Quarter number based on date

Ex: Jan   to march   Between related dates Display Quarter -1

April to June Between related dates Display Quarter -3 etc.

Ex:

now Current date: 2017-01-20       week: Quarter-1;

now Current date:2017-05-14           week: Quarter-2

1 ACCEPTED SOLUTION

remove current.update()



var check= current.u_another_open;


var test = new GlideDateTime(check);


var mn = test.getMonth();


var quar = Math.ceil(mn/3);


gs.log('hellosssssss'+quar);


current.u_dateee=quar;




find_real_file.png


View solution in original post

37 REPLIES 37

string type.


make it is an integer.. then you will not get decimal value..


Hi Harsh Vardhan



now it is working fine,   Thanks Harsh.


can we change the value position, actually it is showing in field corner so can we fix it field starting position.



find_real_file.png


you can change the value alignment through field style.


create field style on that integer field and make the alignment to the left.



How to left align integer fields in listview?  


find_real_file.png



hope it will help you..