# data convert from autopsy module 

**URL:** <https://sleuthkit.discourse.group/t/data-convert-from-autopsy-module/2948>\
**Category:** Autopsy Help\
**Created:** [November 18, 2021, 1:17pm UTC](https://sleuthkit.discourse.group/t/data-convert-from-autopsy-module/2948 "2021-11-18T13:17:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ricardo\_Marques](https://yyz2.discourse-cdn.com/free1/user_avatar/sleuthkit.discourse.group/ricardo_marques/32/1304_2.png) [@Ricardo\_Marques](https://sleuthkit.discourse.group/u/Ricardo_Marques)\
**Post date:** [November 18, 2021, 1:17pm UTC](https://sleuthkit.discourse.group/t/data-convert-from-autopsy-module/2948/1 "2021-11-18T13:17:49Z")

</div>

I made a code in python to read these dates, but it’s not working, can you help me?

# Query the contacts table in the database and get all columns.

```
        try:
            stmt = dbConn.createStatement()
            resultSet = stmt.executeQuery("SELECT mediastores.msid, datetime((lastseen/1000000000),'unixepoch'), case datetime((last_sync/1000000000), 'unixepoch') when '1970-01-01 00:00:00' then null else datetime((last_sync/1000000000), 'unixepoch') end, mediastores.mssname, mediastores.name, mediastores.identifier, mediastores.mountpath FROM mediastores")
        except SQLException as e:
            self.log(Level.INFO, "Error querying database for contacts table (" + e.getMessage() + ")")
            return IngestModule.ProcessResult.OK

        # Cycle through each row and create artifacts
        while resultSet.next():
            try: 
                msid = resultSet.getString("msid")
                lastseen = resultSet.getInt("lastseen")
                last_sync = resultSet.getInt("last_sync")
                mssname = resultSet.getString("mssname")
                name = resultSet.getString("name")
                identifier = resultSet.getString("identifier")
                mountpath = resultSet.getString("mountpath")
                #EmailAddr = resultSet.getString("EmailAddr")
                #StreetHousenumber = resultSet.getString("StreetHousenumber")
                #City = resultSet.getString("City")
                #State = resultSet.getString("State")
                #Country = resultSet.getString("Country")
                #Postalcode = resultSet.getString("Postalcode")

```

 ![image](https://global.discourse-cdn.com/free1/uploads/sleuthkit/original/2X/6/61fa48f26b066070d2a4ba6d1cc9a2c29b3213cf.png)
