Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am creating Two variables for Year and Month, as I am going to use them in my script. But in my data current Year shows as 2016 and Months are starting From April.
Means April is my starting Month i.e. 1 and May as 2 and June as 3 and so on...
I am able to resolve the problem of current year by following formula..
=Year(Today())+1 which gives me out-put as 2016. I know how to get last month i.e. by =num(Month(Today()))-1 which gives me out-put as 10 which is October. But, as I mentioned earlier in my data Year starts from April, October is not 10 but 7 and March is 12.
I don't know how resolve this problem. Please help to resolve the issue.
Thanks in advance.
Hi,
You can try like
num(Month(Today())-4)
Regards
Hi,
You can try like
num(Month(Today())-4)
Regards
Hi,
for jan, feb, Mar
you can write
if(num(Month(Today()))>3,num(Month(Today())-3),num(Month(Today())+3))
Regards
Or, simply =Num(Month(AddMonths(Today(),-4)))
Thanks for your help...vary useful.
Another solution,
=num(Month(Today())-(Num(Month(Today()))-Mod(month(today())-4, 12)))