10-15-2020 07:47 AM
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.
Solved! Go to Solution.
10-15-2020 09:27 AM
I have been doing this since LabVIEW 5.1
10-15-2020 09:31 AM
I actually made a library to convert between different epochs. Conversion to Julian was interesting.
10-15-2020 09:28 PM - edited 10-15-2020 09:30 PM
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
10-16-2020 03:20 AM
Thanks for your feedback guys. A couple of questions 🙂
Is RTSLVU real name Julian?
billko: have you shared your time conversion lib?
10-16-2020 04:57 AM
@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
10-16-2020 06:55 AM
@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". 😉
10-16-2020 07:08 AM
@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.
10-19-2020 02:26 AM
Thanks Bob_Schor and billko for your feedback.
Interesting history around the Julian calender and the Egyptian calander. It was worth a knowledge refreshment 😄