Jump to content

String>Time Conversion


Recommended Posts

Often people read text data which includes a date\time.

Currently, there is no inherent function in LV for converting a time string to a timestamp.

The suggestion is to have a VI, basically a reverse VI to Format Date\Time String, which will convert a date\time string to a LV timestamp based on a LV format string.

Link to comment
  • 1 year later...
Often people read text data which includes a date\time.

Currently, there is no inherent function in LV for converting a time string to a timestamp.

The suggestion is to have a VI, basically a reverse VI to Format Date\Time String, which will convert a date\time string to a LV timestamp based on a LV format string.

In LabVIEW 8 and later there is a better way to scan a string into a time. Use the "scan from string" primitive with a format string such as "%.3T" or "%<%H:%M:%S %m/%d/%Y>T". LabVIEW help has more information about format strings for time. See the topic "Format Specifier Examples" for more information.

Granted, it still would be nice for a Scan time string function in LabVIEW. However, with the above feature, it would be easy to make.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.