This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
easiest way is datetimeadd(datetimefirstofmonth(),-1,'days').
Reset back to the first day of this month and go back one day. This is best because the last of month function will vary based on the number of days in a month (30 vs 31).
Lastly, the datetimelastofmonth() is not really a function, per se, as it cannot contain parameters. It's only used to determine the last day of the current month. Same goes for datetimefirstofmonth().