Jump to content

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

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