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 |
What is the entry and exit point of automation testing
How to send the qtp results file by email (Lotus notes).
requirement is for combo box your expected value is str= "Denver.Frankfurt.London.Los Angeles.Paris.Portland.San Francisco.Seattle.Sydney.Zurich" ar = Window("Flight Reservation").WinComboBox("Fly From:").GetContent your actual value is : that shows data in combo box how can u test the both data is correct or not by using split function
Synchronozation types in QTP
How to retrieve the object properties at runtime without the usage of GetROProperty?
What are SetToProperty, SetRoProperty, GetToProperty scripting?
Where virtual objects stores results?
there are having 10 checkboxes..how can i check only first 5 check boxes by using descriptive programing..
what is the difference between image and bitmap check point
Tell me few important difference Between QTP and WinRunner?
what are the settings to be done to make the recovery scenario created for one test to be used bye all the other tests. please tell me recovery scenario process in detail.
if we made any changes in shared object repository how it reflects of others like our team members?