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: 

Cannot get system date. My input format is %Y%m%d and the output is also a format 'YYYYMMDD'?

Solved!
Go to solution

Dear all,

 

 

I am using Labview 8.5.

I am trying to get system date.

I use Format Date/Time String tool in a "%Y%m%d" format.

The PROBLEM is the Format Date/Time String return 'YYYYMMDD' only. 

 

Please see my attachment to see.

Please help me with this, every time I encounter this problem it force for to re-install the labview program.

 

Best Thanks!

0 Kudos
Message 1 of 18
(4,639 Views)

Thats pretty odd. Heres the same thing (in LabVIEW 2012 though) that produces exactly what you expect.

 

datetime.png

0 Kudos
Message 2 of 18
(4,615 Views)

Yes. I'm in a thought that there are conflicts between Labview and Visual Studio.

Because that happened a couple of days after installing Visual Studio.

 

If that so or not, how to solve this issue???

 

---

Best Thanks..

0 Kudos
Message 3 of 18
(4,602 Views)

@Cloud05 wrote:

Yes. I'm in a thought that there are conflicts between Labview and Visual Studio.

Because that happened a couple of days after installing Visual Studio.

 

If that so or not, how to solve this issue???

 

---

Best Thanks..


This seems unlikely. I have three versions of LabVIEW installed (2011, 2012, 2013) as well as the 2014 beta. I also have three versions of Visual Studio Professional installed (2008, 2012, 2013). I installed Visual Studio 2013 after installing LabVIEW 2013 and 2014b.

 

Assuming that you have tried the simple VI on another computer successfully then I suggest contacting your local NI agent. Unless someone here has specifically seen this behaviour before it is a complex issue to resolve.

0 Kudos
Message 4 of 18
(4,596 Views)

@Cloud05 wrote:

Please see my attachment to see.


Can you attach the actual VI?

What do you get if you leave the format unwired?

0 Kudos
Message 5 of 18
(4,588 Views)

tyk007 - It is sucessfully working with other computers but there are some computer having this problem.

 

0 Kudos
Message 6 of 18
(4,565 Views)

This is really weird. I suspect that the problem is with the system and not with LabVIEW. Do other program display the time correctly? What about commandline (just type "time")?

 

I would also do a full virus/malware scan on that PC.

0 Kudos
Message 7 of 18
(4,521 Views)

Can you check if LabVIEW thinks the format is valid for that computer?  One quick way I know is to use the timestamp control Display Format --> Advanced editing mode and you can cut and paste your format into there.  If you have a green light, LabVIEW thinks you're good to go.  Maybe the results can be of use to those who are helping here in the forum?

 

If LabVIEW thinks it's bad, maybe you can assemble it from clicking on the formatting strings below?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 18
(4,501 Views)

by default LabVIEW uses the system time format YOU CAN change the format of the system OR you can specify the exact format you want in your application but, be aware 

 

"%Y" is 4 digit year i.e 2014

"%y" is year in century (00-99)

 

you probably did not notice the case sensitive nature of the year format specifiers.


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 18
(4,494 Views)
Jeff, he does not get any numerical output, just letters, if I understood right.
0 Kudos
Message 10 of 18
(4,486 Views)