LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Date/Time String outputting wrong date

Solved!
Go to solution

ok... has anyone seen this before?  I'm trying to set a date in the future... and when I convert it to a string, using the Get Date/Time String function, I'm getting a date of 1964.  I'm sure it is probably some issue relating to the date I'm choosing... but I'm trying to leave it as far out as possible.  Any suggestions? 

I've included the base code showing this, in addition to a screen-shot of what I'm seeing.

I did some digging and found it may be related to a time-zone thing, or something?  But I haven't changed my time zone on my PC ever... 

Any help is greatly appreciated. 

Download All
0 Kudos
Message 1 of 7
(2,456 Views)

*NOTE: I did try using the different formats, and in every case, the time is way off and the date is 1964 (for an input date of 12/31/2100 12PM

0 Kudos
Message 2 of 7
(2,454 Views)

It looks like 2/6/2040 12:28AM is the last date it will correctly interpret.
(Note, I do have a 64-bit system, but I'm forced to use the 32-bit version of LV due the Database Connectivity Toolkit only being available in 32-bit)

0 Kudos
Message 3 of 7
(2,430 Views)
Solution
Accepted by topic author dbrown78

It works fine using Format Into String. I would think it's a bug in the Get Date/Time String

fp.PNG

 

bd.png

0 Kudos
Message 4 of 7
(2,401 Views)

sounds like it... 

0 Kudos
Message 5 of 7
(2,395 Views)

Maybe NI is trying to get you to move over to NXG by the year 2040.  😉

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.
Message 6 of 7
(2,354 Views)

Looks like the Get Date/Time String.vi is converting the timestamp to a U32, the roll-back is happening after 01:28:15 Feb 05, 2040 (4294967295 seconds past Jan-01, 1904).

 

Ben64

Message 7 of 7
(2,338 Views)