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 |
How to get the column count and column name from the resultset in the database connection program?
What is checkpoint in qtp?
What is the method for maximize the application while we using Decriptive programming in QTP?
difference between waitProperty & Checkproperty
What are the different recording modes and how do they work?
We have opened three browser such as Facebook,Gmail,Amazon,I want to generate the script of Login of Amazon application, but while adding the object such as edit box(user id,password) in OR is not added.Could you please resolve my issue
How are actions and functions different in QTP?
in my system object spy show the web application as a window based propeties ex:winedit like that and also not recording scripts also so what should i do
what does it mean when a check point is in red color? what do u do?
What are the different types of qtp test assets and their extensions?
What exactly a frame Work means?what are the different type of frameworks done in QTP?why the caption for QTP given as advanced keyword driven?
How to use Regular Expressions in QTP? give an example.
10 Answers ABC, Accenture, Ordain Solutions, SCL,