Helper to compare i.e two months in different years

Categories: ANDROID like

This method will help in comparing two dates by trimming date format to our specific format. So we avoid unnecessary data. Sample: We compare two months in different years. First date is: 2017-10-10 10:00 First we convert it to milliseconds using `SimpleDateFormat`. We want know only time for 2017-10 So after we get millisecond, we […]

Change time in genymotion emulator – simple java app

Categories: NON ANDROID like

I made app in executable jar java file for setting time in genymotion emulator. Here is simple java code and compiled app for setting time in genymotion app. Below code I showed how the app looks like and also added ready jar app to download. Code: public class SetTimeInGenyMotion { private JTextField textField1; private JButton […]

Convert time in long to specific date format – SimpleDateFormat in action!

Categories: ANDROID like

Here is that pretty snippet for converting long to specific date format: public static String getDate(long milliSeconds, String dateFormat) { // Create a DateFormatter object for displaying date in specified format. SimpleDateFormat formatter = new SimpleDateFormat(dateFormat); // Create a calendar object that will convert the date and time value in milliseconds to date. Calendar calendar […]