Example Code

Day Differences in LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

 Overview:

This VI contains a mathscript node, which calculates the number of days between given dates.

 

Description:

The dates are specified in a matrix. Each row represents a date. The 1st column contains the day, the 2nd column the month and the 3rd the year. If the matrix contains N dates (=N rows), the resulting array containing the day differences will have N-1 elements. Note: The calculation does not include the end date.

 

Requirements:
LabVIEW 2012 Base Development System (or compatible)

MathScript RT Module 2012 (or compatible)

 

Steps to Implement or Execute Code:

  1. Set the desired starting and ending dates on the Date Matrix.
  2. Run the VI.

Additional Information or References:Snippet 6101.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.