Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
20 ratings:
 2.5 out of 5     Rate this Document

How Can I Write a Timestamp with my Data to a Spreadsheet using LabVIEW?

Primary Software:
Primary Software Version: 1.0
Primary Software Fixed Version: N/A
Secondary Software: N/A

I want to include a time stamp as a column along with my data in a spreadsheet file in LabVIEW. How do I do this?

Since a spreadsheet file is a specialized type of text file, you need to first convert your data and time stamp into a string. You can do this in three steps:
  1. The time stamp must be wired to either a Get Date/Time or Format Date/Time

  2. Your data must be wired to a string/number conversion VI. Two possibilities are Number to Fractional for floating point numbers and Number to Decimal for integers.

  3. Finally, the data and time stamp strings must be joined into a string array. You can do this by wiring the time stamp string and number string to a Build

After the time stamp and array are in a string array, you can write it to a spreadsheet file. You can see a community example of the code below in the related links section below.

Related Links:
KnowledgeBase 3DSS8NS: How do I create a Millisecond Timestamp in LabVIEW?
KnowledgeBase 1RBDAG5P: Precision Errors Writing and Reading with Write to Spreadsheet File and Read from Spreadsheet
KnowledgeBase 3PJC3B8: How to Convert a Date/Time String into a Timestamp Constant
NI Community Example: Writing a Timestamp with my Data to a Spreadsheet using LabVIEW


Inserting Time Stamp into a Spreadsheetver80.viInserting Time Stamp into a Spreadsheetver85.viInserting Time Stamp into a

Report Date: 09/07/2007
Last Updated: 04/23/2013
Document ID: 4D6CM9QQ

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit