NI LabVIEW,CVI,数据采集等产品讨论区

取消
显示结果 
搜索替代 
您的意思是: 

在数据库里插入数据注意点

我玩了几天数据库,遇到了点问题,来和大家分享,希望大家少走弯路。

问题描述:

在往服务器上保存数据时,经常回保存当前时间,有时电脑的时间不准,会保存错误的数据。

解决方法:

插入服务器的时间,具体做发如下图:

 

QQ群:13267790

 

0 项奖励
1 条消息(共 4 条)
3,820 次查看

Wouldn't Format String is better, faster and neater for formating the date & time into string?

 

i.e. Example of using Format String 

 

 LVVILIB_STR_format string example.png

Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 项奖励
2 条消息(共 4 条)
3,817 次查看

Yes, format is more clear:)

but need to add "\01date/time\01" before the string when insert into SQL as time.

Boone.

0 项奖励
3 条消息(共 4 条)
3,800 次查看

Hi Boone301 

 

That's for demo purpose... 

Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 项奖励
4 条消息(共 4 条)
3,772 次查看