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
Hi, How Accessibility checkpoint in QTP can be implemented in the test script?
How will you handle java tree in qtp?
How to creating an output value using quicktest professional?
What is expert view and keyword view?
How to use checkpoints in qtp ?
What is the limitation to XML Checkpoints?
How many ways we can parameterize data in quicktest professional?
How many types of actions are there in quicktest professional (qtp)?
Difference between copy to action and call to action?
what testplan contents and what test strategy contents,what is the diff b/w them
How many add-ins comes by default with quicktest professional?
Hi all, I am using windows vista, I am in the process of learning QTP. When ever I try to work with insert mode in flight application , i am getting the error of 'Operation must use an update table query, fractional truncation(null) error. Can anyone help me regarding this?
hi to all, i need a code.. in flight application 1.i need to login first then i need to insert 3 new orders... 2.i have to log out 3.i have to login again with different user 4.need to insert 2 new orders 5.then need to log out 6.then again login with different user 7.3 new orders create and log out 8.but we hv to do this using data table and actions please help me
Should have experience in framework means?
What are the features supported by UFT?