Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to go back the previous year in the variable?
vMesAtual = Makedate(year(today()),month(today()),25);
vMesAnt = Makedate(year(today()-30),month(today()-30),25);
I need to fix the variable to bring 12/25/2017 = vMesAnt
But the variable must always be on the 25th of every month
Example:
vMesAnt : 25/12/2017
vMesAtual: 25/01/2018
any suggestion?
Oh, you want to go just one month back? Try this
vMesAnt = AddMonths(MakeDate(Year(Today()), Month(Today()), 25), -1);
May be this
vMesAtual = MakeDate((Year(Today()) - 1), Month(Today()), 25);
or
vMesAtual = MakeDate(Year(AddYears(Today(), -1)), Month(Today()), 25);
Use addYear(YourExpression,-1)
Regards
If the date is 2/25/2018 and 1/25/2018 will it work?
Oh, you want to go just one month back? Try this
vMesAnt = AddMonths(MakeDate(Year(Today()), Month(Today()), 25), -1);
Hi, try this
vMesAnt = Makedate(AddYears(today(),-1),month(today()-30),25);
Thanks for your patience and competence.
Sunny will be that the set analys is correct?
It is not bringing values...
vMesAtual = Makedate(year(today()),month(today()),25);
vMesAnt = AddMonths(MakeDate(Year(Today()), Month(Today()), 25), -1);
Sum({$<Ano =,Mes=,Date1 = {">= $(vMesAnt) <= $(vMesAtual)"},
[Movimento_Tipo_Operacao]={'DEV','VND','VPC','VEF','ACE','FPV','CVE'},[Dt_Passou1]={'0'} >}Preco_Final)
Don't add spaces and then try this
Sum({$<Ano =,Mes=,Date1 = {">=$(=vMesAnt)<=$(=vMesAtual)"},
[Movimento_Tipo_Operacao]={'DEV','VND','VPC','VEF','ACE','FPV','CVE'},[Dt_Passou1]={'0'} >}Preco_Final)
or this
Sum({$<Ano =,Mes=,Date1 = {">=$(=$(vMesAnt))<=$(=$(vMesAtual))"},
[Movimento_Tipo_Operacao]={'DEV','VND','VPC','VEF','ACE','FPV','CVE'},[Dt_Passou1]={'0'} >}Preco_Final)
Sum({$<Ano =,Mes=,Date1 = {">=$(=vMesAnt)<=$(=vMesAtual)"},
[Movimento_Tipo_Operacao]={'DEV','VND','VPC','VEF','ACE','FPV','CVE'},[Dt_Passou1]={'0'} >}Preco_Final)