Is it possible to generate a random datetime using Jodatime such that the datetime has the format yyyy-MM-dd HH:MM:SS and it should be able to generate two random datetimes
try
Random r = new Random(); long t1 = System.currentTimeMillis() + r.nextInt(); long t2 = t1 + 2 * 60 * 1000 + r.nextInt(60 * 1000) + 1; DateTime d1 = new DateTime(t1); DateTime d2 = new DateTime(t2);