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 do you check ticket cost and ticket number in flight application?
what type of values given to objects. EX::Set oBrowser=Description.Create oBrowser(“micclass”).Value=”Browser”
Hi, Can we open a test in qtp10 which is saved in qtp 9.2?
ACTUALLY I AM WORKING IN THE DISTRIBUTION DOMAIN.MY COMPANY IS PROVIDING DISTRIBUTION SOFTWARE FOR PHARMA AND FMCG DISTRIBUTORS.HERE I AM USING QTP 9.2.HERE IN MY APPLICATION WHILE RECORDING ONE WINDOW APPEARS.IN THAT I CAN SELECT THE ITEM OR NO NEED TO SELECT.BUT WHILE RUNNING THE SAME SCRIPT THE WINDOW MAY NOT APPEAR OR APPEAR.HOW TO WRITE SCRIPT FOR THIS
How can I change object description or check point values in qtp?
how to download mercury qtp9.2 ny internet ?
How to create a standard checkpoint ?
What is the difference between local and shared object repository in qtp?
What are the flaws in water fall model and how to overcome it?
What if recovery scenarios is also failed for identify the alert ? (We are handling unexpected popup through recovery scenarios but if still recovery scenarios also failed than what should be the approach)
what is the difference between development and testing
what is keyword driven testing in qtp?n how is it useful?
Could anyone help me for the below scenario: i am using the descriptive programming for my account, in which we have to generate the contract in the MS-word. when i generate this doc, we need to click on enable macros to continue further. but i am unable to make qtp to click on this. if anybody faced the problem like this??? pls help to get it resolved? Thanks in advance
Where to use function or action?
Differentiate the type of test cases which can be automated and which cannot be automated?