Hello Pelle,
I have tried this on Win2k and on XP with the same results.
The month seems to be off by one.
I am attaching a screen shot and a project.
Regards,
DMac
Note that the tm_mon member of the tm struct goes from 0 to 11, not 1 to 12. Better as an array index, worse as a literal month...