Using time function, can I get specific variables like month or day?

I have a type "transactions", with different types including some ints for date. I saw some functions like ctime that, from the what the cplusplus site shows, will output month day year and even time. I don't need all that but I do like that it gets those for me. Is there anyway to get certain variable like the month and year from ctime? How does tm_mon etc. work?
You can use 'strftime()' for that purpose
... or any of the time functions. Read the documentation for the <ctime> stuff -- it comes replete with examples.
Topic archived. No new replies allowed.