Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Time stamps to string with seconds

Good Day

 

Im writing a program for my DAQ system. Its required that my

data is saved with hours, mins and secs. The get date/time

string VI seems to only output a string with the date and with

hours and minutes. 

 

How would I include the seconds into the outputed string.

 

Thank You for your time.

0 Kudos
Message 1 of 4
(5,726 Views)

The vi has an boolean input 'want seconds' default is FALSE. Wire a TRUE and your done 🙂

For a more flexible output there is also the

Format Date/Time String Function

Owning Palette: String Functions

Requires: Base Package

Displays a timestamp value or a numeric value as time in the format you specify using time format codes. For example, %c displays locale-specific date/time. Time-related format codes include the following: %X (locale-specific time), %H (hour, 24-hour clock), %I (hour, 12-hour clock), %M (minute), %S (second), %<digit>u (fractional seconds with <digit> precision), and %p (a.m./p.m. flag). Date-related format codes include the following: %x (locale-specific date), %y (year within century), %Y (year including century), %m (month number), %b (abbreviated month name), %d (day of month), and %a (abbreviated weekday name).

Details  

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 4
(5,723 Views)

Thank you for your input, i've managed to solve the issue with the 

get date/ time string VI. Was simple, just had to make one of the 

inputs true.

0 Kudos
Message 3 of 4
(5,711 Views)

Will this string work on a Mac?

0 Kudos
Message 4 of 4
(5,694 Views)