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

I want to run my qtp scipt on the system where qtp is not installed .I don't want to install qtp but i want that system should use the qtp from another system in lan just the qtp instance should be launched on that system without having qtp installed on it .I probably know the solution that it will be solved through RMI but how to get this problem solved plz help i anyone know the answer

4 Answers   Cimcon,


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?

0 Answers   Infosys,


Explain the new feature of UFT regarding the export of test results?

0 Answers  


what is the difference between link and hyperlink?

2 Answers  


how to load all resource files(function libraries,object repositories etc) into tests without associating them?

1 Answers  






when do we write a script in qtp?(plz give me more then 2 reasons)

1 Answers  


please clarify the question ................. i know how to open the notepad file ? but i don't know how to enter the data into opened notepad ? Ex: set a=createobject("wscript.shell") a.run "Notepad.exe" please give the replay. my mail id is raju.ippali@gmial.com, 9823257761

6 Answers  


QTP in mumbai

0 Answers  


wht is Automation testing frame work. pls explain it

3 Answers   Wipro,


Can we put more than one action in a single script???? yes or no.....

2 Answers   BirlaSoft,


What is data driven testing in QTP?

11 Answers   Agile Software,


What does ".mst" stands for? (abc.mst)

3 Answers   Infosys,


Categories