11 lines
316 B
JavaScript
11 lines
316 B
JavaScript
const sqlite3 = require('sqlite3').verbose()
|
|
const db = new sqlite3.Database('../db')
|
|
|
|
db.serialize(async () => {
|
|
db.each("SELECT * FROM assets", (err, row) => {
|
|
row.date = new Date(row.date).toISOString()
|
|
row.date = row.date.substring(0, row.date.length - 14)
|
|
console.log(row)
|
|
})
|
|
})
|