Metal Guitarist Forums banner

1 - 6 of 6 Posts

·
Premium Member
Joined
·
23,428 Posts
Discussion Starter · #1 ·
So, I'm currently building a data acquisition system for an old tool in our R&D lab. I've learned enough LabVIEW in the last two weeks to be dangerous, and I can pass a time from my code to the SQL table just fine, but I'm trying to make my code slicker and quicker, so I'd like to just get a timestamp from SQL.

I've got a simple table setup right now just for testing purposes. Once I start to get the system on the tool, I'll re-define as float, date-time, etc...

Code:
USE [6008]
GO

/****** Object:  Table [dbo].[data1c]    Script Date: 8/20/2015 2:29:42 PM ******/
DROP TABLE [dbo].[data1c]
GO

/****** Object:  Table [dbo].[data1c]    Script Date: 8/20/2015 2:29:42 PM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[data1c](
	[col1] [nchar](25) NULL,
	[col2] [nchar](25) NULL,
	[col3] [nchar](25) NULL,
	[col4] [nchar](25) NULL
) ON [PRIMARY]

GO
 

·
Premium Member
Joined
·
23,428 Posts
Discussion Starter · #4 ·
Congrats! :yesway:

(I don't see a question in there :))
It's sorta in the title :lol:

What I can do: generate a timestamp within LabVIEW, and pass that into SQL along with my data (as all character right now, I haven't learned enough SQL to get the formatting right).

What I want to do: get the timestamp from my SQL server to populate once the data is inserted.

I'm using SSMS with SQL Express, both 2014.
 

·
Premium Member
Joined
·
23,428 Posts
Discussion Starter · #6 ·
Cool, I'll try that Monday :yesway:
 
1 - 6 of 6 Posts
Top