Error 1: Scan From String Function Behaves Differently on LabVIEW Among OS Language Settings

Updated Oct 25, 2023

Reported In

Software

  • LabVIEW

Operating System

  • Windows

Issue Details

I would like to convert a string into a timestamp, using the Scan From String Function.vi. On English Windows OS, the following snippet works perfectly, however it gives Error 1 on Japanese Windows OS.

String to TimeStamp.png

Solution

The timestamp format depends on the system clock of the Windows OS. Hence, full month name (for example June) <%B> and abbreviated month name (for example Jun) <%b>, which are not used by the OS system clock are unsupported and will give the error 1. Use month number (01–12) <%m>, instead.

Japnese.png