patrickokeeffe Posted August 25 Share Posted August 25 `FormatDateTime("%c", ...)` should produce a date and time represented using Window's locale settings, but version 19.1 (b2366) on Windows 10 seems to ignore Windows settings and produce dates using MM/DD/YY regardless. I first noticed the discrepancy in my logging set file time column. Note the difference in configured date/time format versus function result: The old Windows 7-style regional settings are still available and confirm the settings shown in the new dialog. Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted August 25 Share Posted August 25 We literally call a Windows API function for this, so any issues with it not working are related to issues with Windows. We use this function essentially: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/strftime-wcsftime-strftime-l-wcsftime-l?view=msvc-170 Newer releases of Windows do a lot of weird double layer stuff. They even have two control panels! So it may be related to that, that the function is using a different setting than what we would think to determine the locale. Actually looking through it I believe that it may be the setting for Locale for non-Unicode apps. DAQFactory is not unicode (at present). In the end of course, you can use the other specifiers to format the date however you want. Quote Link to comment Share on other sites More sharing options...
patrickokeeffe Posted August 26 Author Share Posted August 26 Yes the double control panels is just terrible. That was my first thought! Unicode vs. non-unicode could also make sense. I need to use the ISO8601 style regardless so not a big deal to just set the format explicitly. Too bad %c doesn't work though, might be worth noting up front in the guide. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.