Is there a good equivalent implementation of strptime() available for Windows? Unfortunately, this POSIX function does not appear to be available.
strptime()
Open Group description of strptime - summary: it converts a text string such as "MM-DD-YYYY HH:MM:SS" into a tm struct, the opposite of strftime().
"MM-DD-YYYY HH:MM:SS"
tm struct
strftime()
An open-source version (BSD license) of strptime() can be found here: http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/time/strptime.c?rev=HEAD
You'll need to add the following declaration to use it:
char *strptime(const char * __restrict, const char * __restrict, struct tm * __restrict);
2.1m questions
2.1m answers
60 comments
57.0k users