diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/operation/mgt/dao/impl/operation/SQLServerOperationDAOImpl.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/operation/mgt/dao/impl/operation/SQLServerOperationDAOImpl.java index f08d1ce510..f4a29ffc86 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/operation/mgt/dao/impl/operation/SQLServerOperationDAOImpl.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/operation/mgt/dao/impl/operation/SQLServerOperationDAOImpl.java @@ -58,11 +58,13 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.text.DateFormat; import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Map; -import java.util.ArrayList; -import java.util.LinkedList; + /** * This class holds the implementation of OperationDAO which can be used to support SQLServer db syntax. */ @@ -192,7 +194,7 @@ public class SQLServerOperationDAOImpl extends GenericOperationDAOImpl { operation = new Operation(); operation.setId(rs.getInt("ID")); operation.setType(Operation.Type.valueOf(rs.getString("TYPE"))); - operation.setCreatedTimeStamp(rs.getTimestamp("CREATED_TIMESTAMP").toString()); + operation.setCreatedTimeStamp(new Date(rs.getLong("CREATED_TIMESTAMP")).toString()); if (rs.getLong("UPDATED_TIMESTAMP") == 0) { operation.setReceivedTimeStamp(""); } else {