epi
(Epi)
April 6, 2011, 6:59am
1
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
scrypt
(Mervinadamil)
July 5, 2011, 1:43pm
2
epi:
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)
qianggan
(qianggan@msn.com)
October 28, 2013, 7:26pm
3
Solved the problem. Thanks.