Converting Excel Date/Time Values to DIAdem and LabVIEW Values

Updated Nov 29, 2022

Reported In

Software

  • DIAdem
  • LabVIEW

Issue Details

I'm importing Excel data into DIAdem or LabVIEW, but my time channel doesn't show the same values in both applications. What can I do to convert Date/Time information from Excel to DIAdem or LabVIEW?

Solution

Excel's Date/Time format is saved as the number of days since 01/01/1900 at 12:00 AM, while DIAdem's Time channel is the number of seconds since 01/01/0000. This causes the data to be interpreted differently in DIAdem. To convert your Excel data to DIAdem's format, use the following formula:

DIAdem_DATA = 24*3600*(EXCEL_DATA+693958)

In LabVIEW, time is recorded from 01/01/1904. Therefore, to convert your Excel data to LabVIEW time use the following formula:

LabVIEW_DATA = 24*3600*(EXCEL_DATA-1462)