ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to insert date/time to sql database

Hi,

 

I would like to insert date and time alongside with my data receiving from the sensor.

Right now i can insert data into sql table everytime when the data changes but i also wanted to insert the date and time as well.

 

Thank you in advance!

0 Kudos
Message 1 of 3
(3,803 Views)
Simpler to just set the date/time column to automatically write the date when you insert a new row.
0 Kudos
Message 2 of 3
(3,794 Views)

I create a field that is a datetime and set the default value to getdate().  So everytime i make an entry into this database, it automatically adds a datestamp.

aputman
0 Kudos
Message 3 of 3
(3,791 Views)