11-20-2019 09:16 PM - edited 11-20-2019 09:17 PM
Thanks Frozen for the "Edit" and credit...
Also thanks for posting a proper screen capture (I don't have LabVIEW installed on my "Internet Computer".)
What I thought was most interesting is the ability to just Use %T and not have to remember all that formatting gobbly gook (%<%Y-%m-%d .....).
Cheers
11-21-2019 01:27 AM - edited 11-21-2019 01:29 AM
Watch out with the %T formatting!!!!!
That will use whatever the current locale is configured for and can vary between computers greatly and even on the same computer between user profiles.
Not a problem if it is just about reading back the file right after it is created but certainly going to bite you if your application is meant to create data files for archiving and read back later from different users.
11-21-2019 06:36 AM
FYI just for fun.
This thread is now the current record-holder in the zombie thread revival thread, a meta-discussion about whether old threads should be locked after a period of inactivity.
(More discussion available if you follow the link, but I'l summarize my own thoughts here: nope, don't lock 'em. Searches turn up old threads and some old threads benefit from correction or expansion, like this new record-holder here for instance.)
-Kevin P
11-26-2019 08:15 PM
Ooooo, I like shiny things and helping or creating world records!
Now another thread I commented on that was created in 2012 has to have some kind of record!
It's 54 pages of comments and I get emails almost daily on it...
https://forums.ni.com/t5/Certification/Sample-Exam-Solutions-for-Review/td-p/1824703
rolfk Thanks for that disclaimer on usage of %T, awesome good to know info!!
04-20-2026 05:22 AM
Heeeeey!
Here's my contribution to keeping this record alive:
I have ISO-8601-Timestamps like 2026-02-04T08:15:53.645748 in my log data and need them to be Labview Timestamps. Using the method suggested by Frozen, unfortunately doesn't work for me (...or anymore?). I tried it with the "T" between Date and Time aswell with it being replaced by whitespace to match Frozens example. Neither works and i get Error 1. Can anybody help? I can't relate the error message to my problem, as i don't see any weird characters in my strings.
I am on Version 2026 Q1 (32-bit) 26.1f0 - thank you very much in advance!
04-20-2026 05:53 AM
@Roumaenski ha scritto:
Heeeeey!
Here's my contribution to keeping this record alive:
I have ISO-8601-Timestamps like 2026-02-04T08:15:53.645748 in my log data and need them to be Labview Timestamps. Using the method suggested by Frozen, unfortunately doesn't work for me (...or anymore?). I tried it with the "T" between Date and Time aswell with it being replaced by whitespace to match Frozens example. Neither works and i get Error 1. Can anybody help? I can't relate the error message to my problem, as i don't see any weird characters in my strings.
I am on Version 2026 Q1 (32-bit) 26.1f0 - thank you very much in advance!
Maybe the decimal separator of your OS is the comma?
04-20-2026 06:08 AM
Hey Paolo,
thank you for replying. It is the comma but where in the code do i have to account for that? I don't see any decimal-character at all in the code resp. the format string. Seconds and its fractions / the 6 digits after the decimal point are not separated in the format string as i understand.
04-20-2026 06:49 AM
@Roumaenski wrote:
thank you for replying. It is the comma but where in the code do i have to account for that?
Depending on the actual string you are reading, put %.; or %,; at the beginning of your format string. This will force the localization code use or a period or comma respectively for the decimal separator.
04-20-2026 07:09 AM
Hey crossrulz,
thanks for the input! Would you be so kind to tell me where exactly i have to put "%." in this format-string?
-> %<%Y-%m-%dT%H:%M:%S%6u>T
Sorry for asking, i still struggle to understand how those strings work resp. how to set them. When i tried several positions, i got the error that there are too many specifiers or it simply didn't work. Thank you!
04-20-2026 07:24 AM - edited 04-20-2026 07:32 AM
@Roumaenski wrote:
Hey crossrulz,
thanks for the input! Would you be so kind to tell me where exactly i have to put "%." in this format-string?
-> %<%Y-%m-%dT%H:%M:%S%6u>T
Sorry for asking, i still struggle to understand how those strings work resp. how to set them. When i tried several positions, i got the error that there are too many specifiers or it simply didn't work. Thank you!
As he stated, "put %.; or %,; at the beginning of your format string"
Example: %,;%<%Y-%m-%dT%H:%M:%S%6u>T