sql - Crystal reports - last day of previous month -


i given formula in program, it's giving me first of current month. need last day of previous month, report runs 3rd day of current month want previous month data.

tonumber(totext(year(currentdate), 0, "") + totext(month(currentdate), "00") + '01') 

you use

{datefield} in lastfullmonth 

or if need last day

date(year(currentdate),month(currentdate),1)-1 

Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -