LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can we force to use a specific locale in data formating?

Solved!
Go to solution

Hi all,

  I am using the Format Date/Time String to format the current date to a formatted string, I am specify %b to show the abbreviated month but that parameter depends on the locale in the host computer. Is that any way to force the format on a given locale instead of using the OS's locale? Thanks.

0 Kudos
Message 1 of 3
(2,346 Views)
Solution
Accepted by topic author dragondriver

I don't believe so. The simplest solution would be to call the DateTime to Seconds function, extract the resulting month value from the cluster and then use a look-up table to determine the month name.

 

The look-up table could be as simple as a multiline string that is indexed with the Pick Line function using the month as the line index.


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 2 of 3
(2,326 Views)

@PhillipBrooks wrote:

I don't believe so. The simplest solution would be to call the DateTime to Seconds function, extract the resulting month value from the cluster and then use a look-up table to determine the month name.

 

The look-up table could be as simple as a multiline string that is indexed with the Pick Line function using the month as the line index.


Thanks. I follow the way you suggested.

0 Kudos
Message 3 of 3
(2,311 Views)