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.
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.
08-14-2012 11:08 AM
OK,
So I looked into the Get Date/Time String date function.
It states that it will take a LabVIEW timestamp and convert it to string.
But when the date is greater than 2040 it seems to return the time wihin the range of 1904 why would that be?
Attaching example
Regards,
Maciej
08-14-2012 11:24 AM - edited 08-14-2012 11:24 AM
I'd say you found a bug. You can use the Format Date/Time String instead though.
08-14-2012 11:28 AM
No Bug.
It is the anticipated rollover of the U32 seconds = 4294967295 seconds or about 136.099 years from 1-1-1904 which gives you arounf 2040.
Not to worry NI changed the Date-time to a U64 to correct this issue in a recent version of LabVIEW.
08-14-2012 11:47 AM
@SPECTRE Dave wrote:
No Bug.
It is the anticipated rollover of the U32 seconds = 4294967295 seconds or about 136.099 years from 1-1-1904 which gives you arounf 2040.
Not to worry NI changed the Date-time to a U64 to correct this issue in a recent version of LabVIEW.
Yes, bug. I'm using LV2011 and got the same results. The LV Help says it is using 64 bits for the seconds since 1-1-1904. Therefore my rollover should be in, well, never (the sun will die first). But the timestamp won't go past 7:00pm on 12/31/3000. As I showed above, the Format Date/Time works just fine.
08-14-2012 11:54 AM
Hello gentlemen,
Thank you for your input
I assumed that the LabVIEW timestamp is 128 bits in total:
http://www.ni.com/white-paper/7900/en
an i64 for the seconds and a U64 for the fractions of the second.
Since the Get Date / Time String accepts the whole timestamp ( which means 128 bit value ) ; I'm still missing the connection between the U32 Spectre Dave metioned.
Thanks,
Maciej
08-14-2012 12:05 PM - edited 08-14-2012 12:08 PM
@Mac671 wrote:
Hello gentlemen,
Thank you for your inputI assumed that the LabVIEW timestamp is 128 bits in total:
http://www.ni.com/white-paper/7900/en
an i64 for the seconds and a U64 for the fractions of the second.
Since the Get Date / Time String accepts the whole timestamp ( which means 128 bit value ) ; I'm still missing the connection between the U32 Spectre Dave metioned.
Thanks,
Maciej
Spectre Dave was referring to an I32 for the seconds since epoch. The math comes out about right, so it seems like Get Date/Time String only looks at the lower 32 bits of the seconds since epoch.
08-14-2012 12:11 PM
thinking out loud...
the time conversion depends on the OS... could 32/64 bit a factor?
Done thinking for today.
Ben
08-15-2012 03:41 AM
The OS I used was 64 bit , the LabVIEW process however was 32. I'll give it a try on a 64 LV bit machine later in the day.
08-15-2012 04:54 AM - edited 08-15-2012 05:01 AM
Running this code on a 64 bit ver of labview has no change.
In my view the Get Date / Time String has a bug in it.
The underlying timestamp constant that is wired to it's tereminal has all the information required to conduct the conversion of the date to string. The timestamp constant is described in detail in a link posted above.
The Format Date/Time String funtion ( as metioned by Crossrulz ) has the same input an can compute the appropriate value.
Maciej
10-28-2014 08:04 AM
Has someone filed a bug report for this issue? Or, did anyone from NI respond to this elsewhere in these forums with a CAR#?