LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW time to excel time (UTC and local)

Solved!
Go to solution

Want to save to MS Excel date time format so it is easier for my customer to look at some basic csv-files with timestamps in Excel, as LabVIEW timestamp in seconds require them to add a formula.

Found this:
https://forums.ni.com/t5/Example-Code/LabVIEW-Time-to-Excel-Time-Format/ta-p/3503346?profile.languag...

 

It supported UTC time, added local time.

 

LabVIEW Time to Excel Time.png

0 Kudos
Message 1 of 9
(2,048 Views)

I have been doing this since LabVIEW 5.1

 

LV2OLE_Capture.PNG

========================
=== Engineer Ambiguously ===
========================
Message 2 of 9
(2,022 Views)

I actually made a library to convert between different epochs.  Conversion to Julian was interesting.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 3 of 9
(2,020 Views)

Julian, huh?  Could that be why Excel gets the calendar wrong for the year 1900 (which it considers a Leap Year, if I remember correctly ...)?  Glad to see that all of the so-far-existing Posters on this topic are equally date-nuts!

 

BS

Message 4 of 9
(1,982 Views)

Thanks for your feedback guys. A couple of questions 🙂

Is RTSLVU real name Julian?
billko: have you shared your time conversion lib?

0 Kudos
Message 5 of 9
(1,962 Views)

@paljacob wrote:

Is RTSLVU real name Julian?


"Julian" (as in Julian Calendar) refers to someone older, as in "Julius Caesar", which gave us Leap Year every 4 years.  This worked pretty well, but in the 1500s, it was noticed that this was a little too many Leap Years, and hence the Gregorian Calendar (named after Pope Gregory) did away with Leap Years for "Century" years (i.e. 1600, 1700, 2000).  The final "tweak" make Y2K a Leap Year, and every 400 years thereafter.  I don't know for whom this latest Calendar is named.

 

And what's wrong with RTSLVU as a "real name"?

 

Bob Schor

Message 6 of 9
(1,953 Views)

@Bob_Schor wrote:

@paljacob wrote:

Is RTSLVU real name Julian?


"Julian" (as in Julian Calendar) refers to someone older, as in "Julius Caesar", which gave us Leap Year every 4 years.  This worked pretty well, but in the 1500s, it was noticed that this was a little too many Leap Years, and hence the Gregorian Calendar (named after Pope Gregory) did away with Leap Years for "Century" years (i.e. 1600, 1700, 2000).  The final "tweak" make Y2K a Leap Year, and every 400 years thereafter.  I don't know for whom this latest Calendar is named.

 

And what's wrong with RTSLVU as a "real name"?

 

Bob Schor


I think the OP got confused because you didn't quote who you were talking to, and it sounded like you were addressing someone named "Julian".  😉

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 9
(1,937 Views)

@paljacob wrote:

Thanks for your feedback guys. A couple of questions 🙂

Is RTSLVU real name Julian?
billko: have you shared your time conversion lib?


The library contained basically what everyone's posted so far.  The only real difference is that my constants were put into globals instead of hardcoded.  (I hate hardcoding parameter constants because if they ever change, you have to actually release newly compile code, whereas if they are in a global, they can be loaded from config file instead, and all you need to do is change a config file - which avoids expensive reviews and maybe even avoids an ultra-expensive software release.)

 

I created the library because I was implementing a message protocol that included timestamps, and I was on a Windows PC talking to a LINUX box.  I had to convert to and from.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 9
(1,936 Views)
Solution
Accepted by topic author paljacob

Thanks Bob_Schor and billko for your feedback.

Interesting history around the Julian calender and the Egyptian calander. It was worth a knowledge refreshment 😄

0 Kudos
Message 9 of 9
(1,898 Views)