05-24-2005 03:53 AM
03-28-2012 09:53 AM
And 7 years later apparently still not... Just tried %F %T %z, etc... without success. Does this need a Idea Exchange entry ?
Also there's no strptime() to do the converse of strftime(). But maybe there's a #define that secretly activates ISO 8601 ?
With gcc I think strptime needs _XOPEN_SOURCE, but I haven't tried it.
03-28-2012 03:10 PM
In the meanwhile, I wrote some line of code to calculate the week number according to ISO 8601: you can find it here
02-17-2022 11:18 AM
It's 2022 and they still haven't implemented it. I was wondering if there is a way to use Windows SDK version instead of the CVI version of strftime().
02-18-2022 02:58 AM - edited 02-18-2022 03:01 AM
Except for the week numbers you can just use %Y-%m-%d instead of %F.
If the week numbers are important, long ago (30 years!) I wrote an addition to strftime that added several scientific formats. You could just use and modify that source code instead of messing around with the WSDK...
Note that with recent GCC you can customize format specifiers for printf, but some time ago I wanted to rewrite my StrfTime function this way and found out that it is not (yet?) implemented for strftime.
04-12-2022 09:16 AM
I just rolled my own a long time ago. Enjoy.