Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / rahul

there is one adddate funtion in qtp u can use that function
for more detail see date and time function in qtp help
please let me know if u still have any doubt
thanks
rahul pandey
writetorkpandey@gmail.com

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

need clear explanation of actions and functions in qtp with examples?can anyone suggest me gud site for that other than qtp manual?

2 Answers  


How to capture data from images in QTP and produce them in Excel sheet ? please ans...

3 Answers   Sapient,


Hi All I'm new in QTP. I'm trying to make test cases for login on Flight.exe . I have parametrise the agentname and password field. So wen wromg agent name or password is entered it show a dialog box with proper message(Like: "Wrong Password" or :Please enter Password" etc) and OK button. I have created If else block. Now my problem is i want to make checkpoint on error message Dialog box. But each time i create a checkpoint it shows same text message. So how i can check that message is there or not.

2 Answers  


hi is there any chance to change encoding the password

3 Answers  


Is it mandatory to know abt regular expression in descriptive programming

2 Answers  






How to use debug tools?

0 Answers  


images are dynamically changes how to compare two images

2 Answers   Hexaware,


what is run action?

0 Answers  


How will you check that your test cases covered all the requirements?

0 Answers  


what are the cases in which we use XML and accessibility check points.

2 Answers  


how to test globalisation testing using qtp? lets take an example: suppose i have to test the word is in hindi "ratikanta", how we test it by using descriptive programming or any method??

2 Answers   Siemens,


i want to learn testing tools what i have to know before.iam fresher i dnt know any this..which langagues i have to before testing.

2 Answers   Wipro,






Categories