how to read excel varchar date

hi all

How can I read excel varchar date in yii ?

I have a table with a field contain the number of excel varchar date. Let say the number is 38872.5377571528 if I convert that number to date in ms excel, I will get the date value equal 6/4/2006. So 38872.5377571528 is the value in my mysql table field.

Here is the code


        

<b><?php echo CHtml::encode($data->getAttributeLabel('tanggalinput')); ?>:</b>

        <?php echo CHtml::encode($data->tanggalinput); ?>

        <br />



I tried to using strtotime, date, and str_to_date but no one is success.

Please help. Thanks

try date("Y-m-d",38872.5377571528)

Solved the problem. Thanks.