Jump to content
News about the LabVIEW Wiki! Read more... ×
d_laub

Variant Config: format timestamps in human readable form

Recommended Posts

Currently, saving a date/timestamp to a config file saves it like this:

Time Stamp = "00000000ÍAm#ß~p0000000000"

 

I'd much prefer they be formatted like:

Time Stamp = "2013-02-13T16:17:39.873Z"

 

I realize this may run into some localization issues, but I'm fine with defaulting to the ISO 8601 format (or, you could change the "float number format" terminal to a generic "format string" input, and have float/time format strings line-delimited).  The code to do so already exists in "Format Variant Into String", it checks if a waveform is a datestamp type before writing.  This just needs to be ported over to the "Write key (variant)" VI (and correspondingly, to the read VI as well). 

  • Like 1

Share this post


Link to post
Share on other sites

I wonder if anyone has ever saved Timestamps needing better than millisecond precision in a config file.  That would be the potential issue with this suggestion.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site, you agree to our Terms of Use.