Using ColdFusion (Lucee 4.5), I need to insert datetime values that include milliseconds into my MSSQL database. I am creating a UTC datetime value as follows:
nowUTC = dateConvert("Local2UTC", now());
nowODBC = createODBCDateTime(nowUTC);
then I use the following SQL code to insert:
insert into tbl (theTime) values (
However, this method does not include milliseconds. The values inserted in db are as follows:
2015-10-26 02:14:07.000
The last 3 digits after .
(period) at the end is the proportion of the MSSQL of the second record (1/300), which is always.000
How to enable milliseconds or a split second? 1/300
fine.
source
share