Commit 8bc6532b authored by kdabholkar's avatar kdabholkar

commited changes for invalid date format .

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@179593 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 58fc1331
......@@ -285,8 +285,16 @@ public class GstDataIC extends ValidatorEJB implements GstDataICRemote, GstDataI
pstmt.close();pstmt = null;
}*/
sql = "SELECT CODE FROM PERIOD WHERE ? BETWEEN FR_DATE AND TO_DATE";
System.out.println("new one");
pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1, java.sql.Timestamp.valueOf(genericUtility.getValidDateString(new Date(), genericUtility.getDBDateTimeFormat())));
//changed by kaustubh on 31 jan 2018 start
//pstmt.setTimestamp(1, java.sql.Timestamp.valueOf(genericUtility.getValidDateString(new Date(), genericUtility.getDBDateTimeFormat())));
pstmt.setTimestamp(1, java.sql.Timestamp.valueOf(genericUtility.getValidDateString(new Date(), genericUtility.getDBDateFormat())+ " 00:00:00.0"));
//changed by kaustubh on 31 jan 2018 end
rs = pstmt.executeQuery();
......@@ -330,9 +338,19 @@ public class GstDataIC extends ValidatorEJB implements GstDataICRemote, GstDataI
}
}
fromDateStr = sdf.format(fromDate);
toDateStr = sdf.format(toDate);
if(fromDate != null)
{
fromDateStr = sdf.format(fromDate);
}
if(toDate != null)
{
toDateStr = sdf.format(toDate);
}
/* fromDateStr = sdf.format(fromDate);
toDateStr = sdf.format(toDate);
*/
System.out.println("fromDateStr ["+fromDateStr+"] toDateStr ["+toDateStr+"]");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment