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
Can any body please tell me the steps of keyword driven framework of QTP.
i am looking job in perfomance testing using Loadrunner any one help me a project plz......?(Chandana) chs_29@rediffmail.com
could any help me please, how to work on visual foxpro application using UFT
How to interact tool & application build in QTP?
How do I get the QTP scripts result in xml format by using vb script function?
what is the difference between the modular framework and datadriven frame work
Call to copy of an action and call to existing action… i know the diff but in real project how to use..? i want live scenario.pls help me..
I opened gmail login into gmail and i have to save (Pass or move) all the mail into notepad please give me code Thanks of all
In the Hybrid framework, data can access the database, excel file, XML etc. Is it true?
how can we do the frame work in qtp
iam working in QTP for 2+ of exp if i attend the interview what r questions asked in perfomence testing{loadrunner} ? pls any one can say answer to this question?
I want to open a Notepad window without recording a test and I do not want to use System utility Run command as well. How do I do this?
What are the five challenges you faced in QTP?
Print the Prime numbers in below format only up to 20(Need commas also) 1,2,3,5,7,9,11,13,17,19
RECENTLY I PLACED IN QTP..HOW TO IMPROVE VB SCRIPTS KNOWLEDGE? IAM STRUGGING TO WRITE THE AUTOMATION SCRIPTS? ANY BODY TELL HOW TO IMPROVE QTP SCRIPT SKILLS?