cancel
Showing results for 
Search instead for 
Did you mean: 

Date Display

Former Member
0 Kudos

Hi Experts,

I have 2 input fields(Date Picker from date, todate) and one button

when i select the fromdate and todate and clicking the button it will dispaly all the dates(difference)in the table.

for eg: from date:09/01/2009 , to date 09/18/2009

in table it will display

09/01/2009

09/02/2009

09/03/2009

.

.

.

.

.

.

.

09/18/2009

give your suggestions

Regards,

Manivannan P

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

HI Manivannan, You can use the calander option, and can give the start and end dates as initial and end date.

I hope it helps you.

Thanks & Regards

Umang Mathur

Former Member
0 Kudos

Hi Umang Mathur ,

Can you please explain more in detail? what is the method will use initial date and end date in the calender?

Regards,

Manivannan P

Former Member
0 Kudos

solved using the following code


Date first = wdContext.currentContextElement().getVa_fromDate();
		Date last = wdContext.currentContextElement().getVa_toDate();
		
		
		
		long Days = ( last.getTime() - first.getTime() ) / 86400000 ; // ms in a day

		long firstDay = first.getTime() ;
		IPrivateOutdoorDutyView.IVn_DaysElement ele;
		for( long i = 0 ; i <=Days ; i++ )
		{
			ele = wdContext.createVn_DaysElement();
		   Date thisDay = new Date( firstDay + ( 86400000 * i ) ) ;
		   ele.setVa_day(thisDay);
		   wdContext.nodeVn_Days().addElement(ele);
		  
		}

Regards,

Manivannan P