I don't understand what will be the outcome of this piece of code:
intnx('month', datepart(date_example), 0, 'end')
With date_example = '2010-05-12' Is it '2010-05-31'? Basically the last day of that month in that one specific year?
The "END" means to move to the end of the interval. The end of a month is last day of the month. The 0 means to move to the end of the same month.
If your date_example variable has a datetime value (number of seconds), like '12MAY2010:00:00'dt, then your code will first convert it to a date value (number of days), '12MAY2010'd , and then convert it to the end of the month of may in the year 2010, '31MAY2010'd.
If you would rather generate a datetime value for the end of the month then use the DTMONTH interval and remove the DATEPART() function. Then the generated value will become '23:59:59't on the last of the month.