mariadb : JDBC Driver Hint

https://downloads.mariadb.org/connector-java/2.4.2/   /etc/alternatives/jre/lib/ext/mariadb-java-client-2.4.2.jar or /usr/local/share/resin/lib/mariadb-java-client-2.4.2.jar   # vi resin-web.xml   <web-app xmlns="http://caucho.com/ns/resin">         <database>                 <jndi-name>jdbc/mysql</jndi-name>                 <driver type="org.mariadb.jdbc.Driver">                         <url>jdbc:mysql://localhost:3306/test</url>             […]

Read More

Excel vs Unix Timestemp : excel datevalue to java dateformat Hint!

Unix Timestamp from 1970 Excel Timestamp from 1900 Gap : (1970-1900) Days = 25569 Days     String rtn = ""; try{ DateFormat format = new SimpleDateFormat("yyyyMMdd"); //format.setTimeZone(TimeZone.getTimeZone("UTC")); double excelDays = Double.parseDouble((String)valv.elementAt(0)); double unixDays = (excelDays-25569); java.util.Date unixTime = new java.util.Date((long) ( 86400000l * unixDays)); rtn = format.format(unixTime); out.println(rtn); } catch(Exception e) {}  

Read More