hi i have one issue while coding the dates . i want to add
the date curret to 4 days . can any one helme plz about
this

regards
balaji

Answer Posted / kazi

Hi Bala,
this is coding---
public static void main(String args[]) throws Exception
{ SetTest st = new SetTest(); st.addDaysToDate
("28/04/2009", 4);} private void addDaysToDate(String date,
int daysToAdd) throws Exception { Date todayDate = new
Date(); DateFormat sdf = new SimpleDateFormat
("dd/MM/yyyy"); String strDate = sdf.format
(todayDate); Date parsedDate = sdf.parse(date);
System.out.println(strDate); System.out.println
(parsedDate); Calendar now = Calendar.getInstance
(); now.setTime(parsedDate); now.add
(Calendar.DAY_OF_MONTH, daysToAdd); System.out.println
(now.getTime());}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can any body please tell me the steps of keyword driven framework of QTP.

1570


i am looking job in perfomance testing using Loadrunner any one help me a project plz......?(Chandana) chs_29@rediffmail.com

1466


could any help me please, how to work on visual foxpro application using UFT

1687


How to interact tool & application build in QTP?

1462


How do I get the QTP scripts result in xml format by using vb script function?

1785






what is the difference between the modular framework and datadriven frame work

1915


Call to copy of an action and call to existing action… i know the diff but in real project how to use..? i want live scenario.pls help me..

1283


I opened gmail login into gmail and i have to save (Pass or move) all the mail into notepad please give me code Thanks of all

1522


In the Hybrid framework, data can access the database, excel file, XML etc. Is it true?

563


how can we do the frame work in qtp

1605


iam working in QTP for 2+ of exp if i attend the interview what r questions asked in perfomence testing{loadrunner} ? pls any one can say answer to this question?

1605


I want to open a Notepad window without recording a test and I do not want to use System utility Run command as well. How do I do this?

621


What are the five challenges you faced in QTP?

2754


Print the Prime numbers in below format only up to 20(Need commas also) 1,2,3,5,7,9,11,13,17,19

1184


RECENTLY I PLACED IN QTP..HOW TO IMPROVE VB SCRIPTS KNOWLEDGE? IAM STRUGGING TO WRITE THE AUTOMATION SCRIPTS? ANY BODY TELL HOW TO IMPROVE QTP SCRIPT SKILLS?

2183