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
Answer Posted / 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 |
Post New Answer View All Answers
How to find the difference between 2 dates in qtp?
What is the standard timing delay for web based application in qtp?
Can QTP be used for GUI testing ?, We are using Java with MySQL and Operating system is Linux. We are NOT using the web.
Explain building blocks of the bpt framework ?
What the differences are and best practical application of Object Repository?
How you can write contexts to text file in qtp?
What is a quick test professional?
What are the advantages of a Hybrid framework?
What is the difference between call to existing action and copy of an action?
How to add object to object repository in qtp9.0 Suppose for brower yahoo home page
What are the differences between quicktest professional (qtp) and winrunner?
Explain about datafile/verification of date file when file is not available in local system?
What are the recording modes in wave event?
Through array we can execute the testcase how ? give me example
Can any one brief some detail on how the shared and action object repository utilized/implemented in a real time project. I already know how to make shared object repositor by saving OR as .tsr extension..I wanted the actual concept of implementation...couple of live examples will be highly appreciated. Thanks