apex 月末の日付取得

Date targetDate = Date.today();
Integer numberDays = date.daysInMonth(targetDate.year(), targetDate.month());
Datetime dt = Datetime.newInstance(targetDate.year(), targetDate.month() ,numberDays);
String syutokuDate = dt.format('yyyyMMdd');

猜你喜欢

转载自blog.csdn.net/neusoft06/article/details/80621654