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: 

Bug in "Format Date/Time String Function"??

Hi,

I wants to include a string to display the used time. So in every loop I
have to calculate the difference between the starttime and now. That's
ok. But when I use the "Format Date/Time String Function" to convert
into a string like "hour:min:sec" the hour will everytime start with 2
instead 0??? It's my mistake or is there really a bug inside?

Bye
Henrik
0 Kudos
Message 1 of 5
(2,681 Views)
The problem is that LabVIEW takes seconds since 1-1-1904
starting at 2 o'clock, and if you get 5 seconds, and format
this number into time/date string it is considered five
seconds since that predefined time. If you want to see the
real difference, you must wire it to an indicator and
change the format and precission to relative time.
Hope this helps.



* Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful
0 Kudos
Message 2 of 5
(2,681 Views)
Gorka Larrea wrote:

> The problem is that LabVIEW takes seconds since 1-1-1904
> starting at 2 o'clock, and if you get 5 seconds, and format
> this number into time/date string it is considered five
> seconds since that predefined time. If you want to see the
> real difference, you must wire it to an indicator and
> change the format and precission to relative time.
> Hope this helps.
>
> * Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful

Hi,

this was also my first idea...but it is so?? I took a look at the help and there stands nothing about 2p.m.!

"The date/time string is determined from the seconds (now), which is the number of seconds since 12:00 a
.m., January 1, 1904, Universal Time, and time format
string is the format of the output string."

Bye
Henrik
0 Kudos
Message 3 of 5
(2,681 Views)
Hi,

it's ok..I just created my own Vi...;)

Bye
0 Kudos
Message 4 of 5
(2,681 Views)
> Hi,
>
> this was also my first idea...but it is so?? I took a look at the
help and there stands nothing about 2p.m.!
>
> "The date/time string is determined from the seconds (now), which is
the number of seconds since 12:00 a.m., January 1, 1904, Universal
Time, and time format
> string is the format of the output string."
>
> Bye
> Henrik
>
>

It also depends on your time zone setting on your PC. That quote is
based on Greenwich Mean Time.

ej


Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 5 of 5
(2,681 Views)