From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Formatting a timestamp into string with $ specifier

Formatting a timestamp into string with $ specifier does not work; the formatted string is empty and no error is reported:

 

19061iB67D59F74C86F953

 

I have forced the width to 10 to show that the format is at least partially scanned but when it is omitted the timestamp field is empty.

I couldn't find this problem reported/addressed so here it is (LabVIEW 8.6)

 



LabVIEW, C'est LabVIEW

0 Kudos
Message 1 of 9
(3,831 Views)

Ohhhh... Snippets!!! Code Capture Tool is a must. Congrats!

 

19073iEAD4C0EB70CD4DA3



LabVIEW, C'est LabVIEW

0 Kudos
Message 2 of 9
(3,820 Views)

Maybe it means that time isn't money?


___________________
Try to take over the world!
Message 3 of 9
(3,814 Views)

Also, I forgot to say that I can confirm this in 2009.

 

And, you may wish to have a look at the about dialog of the CCT. 😉


___________________
Try to take over the world!
0 Kudos
Message 4 of 9
(3,808 Views)

I just ran into this issue with 2014.  Did we ever get a CAR for this?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 9
(3,520 Views)

Ok looking at the format string, the expected output of the code would be "FILE2014-09-19-SN42.txt"

 

Instead we get "FILE          -SN42.txt"

 

I did a quick search on CARs and found nothing specifically addressing this issue although some similar CARs were filed. I will raise this problem with our LabVIEW developers and see if we should file a CAR on it. However, I don't know how high of a priority a fix would be since there are easy workarounds for this.

 

Thanks,

Daniel C.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 9
(3,489 Views)

 

 

I have a work around for this if anyone needs it badly I can share.

 

I use it to make human readable timestamp for putting into a text file.

 

Might not be in the format you wish for but it will give something.

 

 

 

 

 

 

0 Kudos
Message 7 of 9
(3,476 Views)

""there are easy workarounds for this."""  Ahh there you go.

0 Kudos
Message 8 of 9
(3,475 Views)

Yes, the simple work around is to put the timestamp first in both the string and the inputs.  But this is a bug.  There is no doubt about that.  A high priority?  Probably not.  Something that should be looked for when doing a revamp of the Format String?  Yep.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 9
(3,456 Views)