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

What are the flaws in water fall model and how to overcome it?

0 Answers  


how to click the link in webpage by using QTP Script????????

3 Answers  


what is the difference between wait and wait function

1 Answers   TCS, Wipro,


What are accessibility check point and xml check point?

5 Answers   IBM,


Do you know SQL? I know SQL but i don't have any experience...that's it..No more questions ...simply he said " you can leave for the day" ...guys prepare SQL Quires before attending interview in bank of america...

0 Answers   Bank Of America,






Can we test the Word Document using QTP Tool? We should test the page size,page set up, paragraph indentation and spacing, font size of the the character int the page.

0 Answers  


How do we connect QC by using QTP?

2 Answers   Infosys,


There are 4 webpages in an application, in third page there is one cancel button i want to click that cancel button only, how can I click that cancel buttton ?

4 Answers   Wipro,


what is the default ordinal identifier.what are the send keys in qTP.

1 Answers  


Explain in brief about the quicktest professional (qtp) automation object model?

0 Answers  


What is the Diff between Image check-point and Bit map Check point?

3 Answers   Crea,


My Application is a client server application , but there is one functionality , when we click on one particular icon it launches web browser . When I am recording in QTP , By select approprait web add in also , it not able to record in web page , I am able to record till click on the icon. Please provide me how to over come this type of problem.

2 Answers  


Categories