Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Modified the jsp

  • Loading branch information...
commit bb144c7df03f2e27296b82543cc61ac12ad3f351 1 parent 4a24f4f
Aashish Mittal aashishmittal authored
Showing with 17 additions and 3 deletions.
  1. +17 −3 open311data.jsp
20 open311data.jsp
View
@@ -1,15 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
-
<%@ page contentType="text/xml" %>
<%@ page import="java.io.*" %>
<%@ page import="java.sql.*" %>
-
+ <%@ page import="java.text.*" %>
+
<%
String connectionURL = "jdbc:mysql://localhost:3306/v3wflowdb";
String username = "root";
String password = "";
String tableName = "apps_formdata_open311_request_t";
-String sqlQuery = "SELECT * FROM " + tableName + " ORDER BY dateCreated DESC";
+String dat="01/01/1970";
+String tim="00:00:00";
+long l=0l;
+boolean b_time=false;
+if(request.getParameter("time")!=null)
+{
+
+ l=Long.valueOf(request.getParameter("time"));
+ Date d=new Date(l);
+ Format formatDate = new SimpleDateFormat("MM/dd/yyyy");
+ Format formatTime = new SimpleDateFormat("HH:mm:ss");
+ dat = formatDate.format(d);
+ tim = formatTime.format(d);
+}
+String sqlQuery = "SELECT * FROM " + tableName + " where STR_TO_DATE(c_requestDate,'%m/%d/%Y') > STR_TO_DATE('"+dat+"','%m/%d/%Y') AND STR_TO_DATE(c_requestTime,'%H:%i:%s') > STR_TO_DATE('"+tim+"','%H:%i:%s') ORDER BY dateCreated DESC";
%>
<%
Please sign in to comment.
Something went wrong with that request. Please try again.