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
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 |
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 |
Reverse a string keeping the words in the string as it is. E.G. "Quick Test Professional" O/P "Professional Test Quick"
How to do Batch run in qtp? provide the steps?
Hi guys i'm prepareing for interview question for qtp i don't have bayground for vb scipt language can any one tell me it is easy to do job in qtp without bayground.
How to handle dynamic objects in quicktest professional?
what function you write to do database testing with the help of qtp?
i did B.Tech cse and i secured 76%. instead of siting at home ... i would like to do some course. can u suggest me in this.
During execution, how can we capture the data from the pop- up, ie. when any popup comes with some numbers written on it, then how can we capture the value/number that is coming on the pop-up and save in the dynamic file/or other file, even when the run is going on.
What is the difference in between function and sub as well as give some code of both
What is the use of Testing framework in Automated testing..what are different kinds of Testing frameworks available in Automated testing...
1>why parameterization is necessary in qtp? 2>if we give constant value then what problem?
what is a test strategy & what is the difference between test strategy & test plan?
How qtp recognizes the object?