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

1. how can you handle exceptions without using recovery scenario?

5 Answers   TCS,


How to customize qtp?

0 Answers  


Hi All, Can anyone provide me the license for QTP 9.5.... My Email ID: khanbro@rediffmail.com

0 Answers  


Give the syntax to load function at run time.

0 Answers  


what are inputs for automation?

3 Answers  


can any one tell me how to select some text.i need the script for that

1 Answers  


what is diff b/w function and action?

8 Answers   VSoft,


How Qtp will identifies object during run time

6 Answers   CSS Corp, Yahoo,


Mention the test steps of qtp.

0 Answers  


IS standard check point is very important than the other check points in QTP? If so why?

4 Answers  


How to find a window is minimized or not

0 Answers  


Can u call winRunner scripts from QTP?

4 Answers  


Categories