I have two dates namely the filecreation date and the system date both in the int format as
"20120304","20120404" which is something like YYYYMMDD.
i just want to take the MM part of these two dates these two dates are returned from a function as integers .
Please suggest some examples
Thanks
although i prefer @keety’s answer,there is an other way.
u can use string streams:
for eg:
so after you have your string as
YYYYMMDDin a string varaible.substr(4,2)will be your month.you can later on use
strtolfor converting back to integer.