LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Date string returns inconsistent results

I use the function Format Date/Time String with the format argument "%d%b%Y_%H-%M-%S" to get a string which looks like "01Oct2004_11-01-45". The built application returns the same, however when the application is run on a PC in South Korea the string "01102004_11-01-45" is returned. What is wrong?
0 Kudos
Message 1 of 3
(2,731 Views)
Hello leifk,

it seems they don't have an abbreviated month name 🙂
I think, it depends on the operating system and the country settings. Perhaps Labview can not work with the South Korean font (or unicode or whatever) and replaces the month name by the number...
Btw. I would use "%Y%m%d" to have a alphabetical / numerical sorting order.

Best regards
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(2,731 Views)
I need to obtain %d%b%Y in order to produce "05Oct2004" which is most compatible with SQL insertion into our internal databases (DB2 of course).
My solution:
I wrote a function which gets the current datetime as a cluster and then constructs a datetime string. I placed the 3-letter month names in an array and select the month name by month number.
0 Kudos
Message 3 of 3
(2,731 Views)