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

How to show in django cms breadcrumbs full path? -

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

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