LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
DFGray

Timestamp Conversion Primitive

Status: New

There are a plethora of timestamp formats used by various operating systems and applications. The 1588 internet time protocol itself lists several. Windows is different from various flavors of Linux, and Excel is very different from about all of them. Then there are the details of daylight savings time, leap years, etc. LabVIEW contains all the tools to convert from one of these formats to another, but getting it right can be difficult. I propose a simple primitive to do this conversion. It would need to be polymorphic to handle the different data types that timestamps can take. This should only handle numeric data types, such as the numeric Excel timestamp (a double) or a Linux timestamp (an integer). Text-based timestamps are already handled fairly well. Inputs would be timestamp, input format type, output format type, and error. Outputs would be resultant format and error.

11 Comments
Bluegraf
Member

> It includes a fix for the week number discrepancy between ISO and NI (which I thing is actually a Windows problem).

 

The discrepancy hit us a few years ago.

There are different definitions around for (I think) the US and the rest of the world how to count the calendar week that includes the new year's eve. Is it the last of the old or the first of the new?

It only makes a difference every dozend years or someting but in those years the is an offset of 1 week between the two definitions.

 

Also a case for a flag in a function...