-
tangmq 数据达人Lv4
发表于2019-12-23 14:55
楼主
i的任务中,通常是一年12个月,有些特殊业务场景,一年需要填报13个月的数据。需要自定义的方式,实现报表期类型为13月报
>>得到前一期:
If(asint(mid(@bbq,4,2))=1, asstr(asint(left(@bbq,4))-1)^"13--", asstr(asint(left(@bbq,6))-1)^"--")
>>得到下一期:
If(asint(mid(@bbq,4,2))=13, asstr(asint(left(@bbq,4))+1)^"01--", asstr(asint(left(@bbq,6))+1)^"--")
>>显示格式:
left(@bbq,4)^"年"^str(asint(mid(@bbq,4,2)))^"月"
>>最佳报表期:
if((asint(right(asstr(today()),4))>=101) &( asint(right(asstr(today()),4))<=1215),asstr(left(asstr(today()),6))^"--",asstr(left(asstr(today()),4))^"13--")
>>得到年:
left(@bbq,4)
>>得到月:
str(asint(mid(@bbq,4,2)))
>>得到前一期:
If(asint(mid(@bbq,4,2))=1, asstr(asint(left(@bbq,4))-1)^"13--", asstr(asint(left(@bbq,6))-1)^"--")
>>得到下一期:
If(asint(mid(@bbq,4,2))=13, asstr(asint(left(@bbq,4))+1)^"01--", asstr(asint(left(@bbq,6))+1)^"--")
>>显示格式:
left(@bbq,4)^"年"^str(asint(mid(@bbq,4,2)))^"月"
>>最佳报表期:
if((asint(right(asstr(today()),4))>=101) &( asint(right(asstr(today()),4))<=1215),asstr(left(asstr(today()),6))^"--",asstr(left(asstr(today()),4))^"13--")
>>得到年:
left(@bbq,4)
>>得到月:
str(asint(mid(@bbq,4,2)))