Hello,
I've a date like this (2007-10-22). Now I need to export it to my excel sheet. I can't export the date directly to my excel sheet because he's exporting it like a string (or something, the format is going wrong).
But I did a test, if I convert the date to int and export it to excel and setup the format of the cel in excel it's working fine.
But how can I convert my date to an int? I did it with mktime, but mktime is counting with seconds. And in excel it's counting with days... So I devided mktime by 86400 sec and I got the date.
But mktime is counting from 1 january 1970, and excel is counting from 1 january 1900, so I'm missing +/-70 years :s.
How can I solve this?
The One And Only KryptoS
I've a date like this (2007-10-22). Now I need to export it to my excel sheet. I can't export the date directly to my excel sheet because he's exporting it like a string (or something, the format is going wrong).
But I did a test, if I convert the date to int and export it to excel and setup the format of the cel in excel it's working fine.
But how can I convert my date to an int? I did it with mktime, but mktime is counting with seconds. And in excel it's counting with days... So I devided mktime by 86400 sec and I got the date.
But mktime is counting from 1 january 1970, and excel is counting from 1 january 1900, so I'm missing +/-70 years :s.
How can I solve this?
The One And Only KryptoS