title: Date type in SQLite
body: <p>I have an <strong>excel file</strong> in which I have many columns of <strong>dates</strong> which format is <strong>yyyy-mm-dd</strong> when I upload excel file in <strong>SQLite</strong> using java program. All data upload in their respective columns but <strong>date format</strong> automatically change into <strong>dd-mmm-yyyy</strong>.</p>
  
  <p>I am trying to search data between dates but when date format change I can't search properly because SQLite doesn't support <strong>dd-mmm-yyyy</strong> search</p>
  
  <p>Now, what I can do?
  Thanks...</p>
  
  <p>Reading data Row vise </p>
  
  <pre><code>public static Vector read(String fileName)    {
      Vector cellVectorHolder = new Vector();
      try{
          FileInputStream myInput = new FileInputStream(fileName);
          //POIFSFileSystem myFileSystem = new POIFSFileSystem(myInput);
          XSSFWorkbook myWorkBook = new XSSFWorkbook(myInput);
          XSSFSheet mySheet = myWorkBook.getSheetAt(0);
          Iterator rowIter = mySheet.rowIterator();
          while(rowIter.hasNext()){
              XSSFRow myRow = (XSSFRow) rowIter.next();
              Iterator cellIter = myRow.cellIterator();
              //Vector cellStoreVector=new Vector();
              List list = new ArrayList();
              while(cellIter.hasNext()){
                  XSSFCell myCell = (XSSFCell) cellIter.next();
                  list.add(myCell);
              }
              cellVectorHolder.addElement(list);
          }
      }catch (Exception e){e.printStackTrace(); }
      return cellVectorHolder;
  </code></pre>
  
  <p>Data inserted into a database</p>
  
  <pre><code>private static void saveToDatabase(Vector dataHolder) {
      String ClientAdd="";
      String Page="";
      String AccessDate="";
      String Dates="";
      String Bytes="";
      System.out.println(dataHolder);
  
      for(Iterator iterator = dataHolder.iterator();iterator.hasNext();) {
          List list = (List) iterator.next();
          ClientAdd = list.get(0).toString();
          Page = list.get(1).toString();
          AccessDate = list.get(2).toString();
          Dates = list.get(3).toString();
  
          try {
             // Class.forName("com.mysql.jdbc.Driver").newInstance();
             // Connection con = 
               DriverManager.getConnection("jdbc:mysql://localhost:3306/test", 
               "root", "welcome");
  
             Class.forName("org.sqlite.JDBC");
      Connection con= DriverManager.getConnection("jdbc:sqlite:ourimport.db");
  
             System.out.println("connection made...");
              PreparedStatement stmt=con.prepareStatement("INSERT INTO our(Name,Class,Rollon,Date) VALUES(?,?,?,?)");
              stmt.setString(1, ClientAdd);
              stmt.setString(2, Page);
              stmt.setString(3, AccessDate);
              stmt.setString(4, Dates);
              stmt.executeUpdate();
  
              System.out.println("Data is inserted");
              stmt.close();
              con.close();
          } catch (ClassNotFoundException e) {
              e.printStackTrace();
          } catch (SQLException e) {
              e.printStackTrace();
          }
      }
  </code></pre>