Example Code

Simple Excel Date/Time to Labview

Code and Documents

Attachment

Download All

Overview
This is a subVI to convert Excel type format Date/Time to Labview format.


Description
There are others here also doing similar but this is pretty simplified. It accepts the Excel data as 2 arrays. One for date and one for time. Converts both into LabVIEW format and outputs them to date and time arrays. It ignores daylight savings time so it works with the numbers directly. It works well for me and I thought maybe someone else has had similar needs.


Requirements

  • LabVIEW 2012(or compatible)


Steps to Implement or Execute Code

  1. Download the attached file to your computer
  2. Open the VI " XL Date To Lv Date 2012 NIVerified.vi"
  3. Run the program

 

Additional Information or References
VI Snippet

 BD.png

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

 

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
0Forest0
Member
Member
on

Excel have bool flag "Date1904". It is property of workbook.

Date in 1900 year = Date in 1904 year + 1462 days.

And we shell save into Excel and load later Time zone+DaylightSavingTime.