LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW time to excel time (UTC and local)

Solved!
Go to solution
Highlighted

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
(245 Views)
Highlighted

I have been doing this since LabVIEW 5.1

 

LV2OLE_Capture.PNG

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
Message 2 of 9
(219 Views)
Highlighted

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
(217 Views)
Highlighted

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
(179 Views)
Highlighted

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
(159 Views)
Highlighted

@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
(150 Views)
Highlighted

@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
(134 Views)
Highlighted

@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
(133 Views)
Highlighted
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
(95 Views)