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

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

How to transfer a Date or a time string to a double variable

已解决!
转到解答

How to transfer a Date or a time string to a double variable?

for example, transfer "2012-06-06 12:32:12" to a double, and then I can use it to set the axis of my graph. Thank you!

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

How to ? How to ?

0 项奖励
2 条消息(共 4 条)
3,443 次查看
解答
已被主题作者 billsmate333 接受

Convert to TimeStamp first, then typecast to double.

 

untitled.png

 

 

George Zou
3 条消息(共 4 条)
3,441 次查看

Thank you! In the Measurement Studio for VS2008, conveting date to double is very simple through CTime or COleTime Class. Get the seconds of a date, and then divided it by 24*60*60 ( namely total seconds of a day), the result is a doble, and you can use it to set the axis of a graph .

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