Get Components of Time Returned by Get Date/Time in Seconds

Updated Oct 26, 2023



  • LabVIEW

The Get Date/Time in Seconds VI returns the current date and time when the VI is called, but this information is bundled into a single data type. This data type must be modified to retrieve the individual components of the date and time.

  1. Obtain the date and time using the Get Date/Time in Seconds VI
  2. Pass the obtained date and time to the Seconds to Date/Time VI to convert the datatype of the obtained date and time from "seconds since 1 Jan 1904" to a "date time rec" cluster.
  3. Use the Unbundle by Name VI to break the cluster into discrete portions of the date and time, including the values in the hour, minute, second places for the time and the day and month of the year.

The values obtained using the Unbundle by Name VI can be used to make calculations/sort values based on discrete elements of the time and date.