Wondering if there is any significant distinction between the following methods of recording a timestamp while creating a database record:
- Using Ignition's
system.date.now()
function, then inserting that value - Using the database's
CURRENT_TIMESTAMP
function (assuming Microsoft SQL Server)
Example of first one:
partNum = '555AB'
now = system.date.now()
query = """INSERT INTO Orders
(PartNum,InsertedOn) VALUES(?,?)"""
args = [partNum,now]
system.db.runPrepUpdate(query,args,'MyDbConnection')
Example of second one:
partNum = '555AB'
query = """INSERT INTO Orders
(PartNum,InsertedOn) VALUES(?,CURRENT_TIMESTAMP)"""
args = [partNum]
system.db.runPrepUpdate(query,args,'MyDbConnection')
Is it even worth splitting hairs over?