The blog gives you idea of testing and automation testing example of selenium webdriver,SQl and Jmeter, you see the basic example of selenium web driver and get idea how to do automation testing,

Program To convert Date into Long and Vise versa

you are working on an application in which you want to convert date into Long or vise versa of the same, long intodate then use the below code.
using of long into date and date into long is depend on the code requirement or use of the programme.
explain you to convert date into long, I use in built function in it.

import java.util.Calendar;
import java.util.Date;

public class test {

        public static void main(String[] args) {
                
                Date dt=new Date(Long.valueOf(1390973400983L));
                System.out.println(dt.toString());
                
                Calendar cal=Calendar.getInstance();
                cal.set(2014, Calendar.JANUARY, 29, 11, 00, 0);
                
                System.out.println(cal.getTimeInMillis());
                System.out.println();
                
        }
}

No comments

Post a Comment

Powered by Blogger.