12-12-2013 10:50 AM
I need to time stamp my data before sending it to the file. I have been doing this with the standard calendar date and time but MJD is what we prefer to use. How can I get an MJD timestamp in LabVIEW 2012 SP1?
Solved! Go to Solution.
12-12-2013 11:24 AM
12-12-2013 11:32 AM
Hello Brad_Henry,
The Format Date/Time String will return the day of the year when the %j argument is used, as per this help document:
LabVIEW Help: Format Codes for the Time Format String
http://zone.ni.com/reference/en-XX/help/371361J-01/glang/codes_for_time_format_str/
If you're looking for the actual MJD, I'm not aware of a built-in function that generates this so you'll probably need to create or find a function to calculate it manually. This should pretty basic arithmetic, and it looks like people have already made a few public examples, the first two search results here look to be just about what you need:
ni.com search:
http://search.ni.com/nisearch/app/main/p/bot/no/ap/tech/lang/en/pg/1/sn/catnav:ex/q/julian/
Regards,
12-12-2013 11:33 AM
Thank you but that does not give MJD, it gives JD.
Brad
12-12-2013 11:42 AM