cancel
Showing results for 
Search instead for 
Did you mean: 

get the last day of month

Former Member
0 Kudos

Hi

I want get the last day of mount from the Date variable without using RFC but with webdynpro code.

please help me

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

   
int lastDay = 0;

Calendar c  = Calendar.getInstance();
c.setTime(<your Date variable>);
		
lastDay = c.getActualMaximum(Calendar.MONTH);

Regards,

Satyajit.

Former Member
0 Kudos

Small but important correction:


lastDay = c.getActualMaximum(Calendar.DAY_OF_MONTH);

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Former Member
0 Kudos

hit works

thanks

Answers (0)