Posted By

sekihin on 12/29/10


Tagged

php date


Versions (?)

convert 8byte number to datestring(YYYY/MM/DD)


 / Published in: PHP
 

  1. function dispDateFromNum($numval) {
  2. $dateval = "";
  3.  
  4. if ($numval == "")
  5. {
  6. $dateval = "";
  7. }
  8. else
  9. {
  10. $dateval = substr($numval,0,4) . '/' . substr($numval,4,2) . '/' . substr($numval,6,2);
  11. }
  12. echo $dateval;
  13. }

Report this snippet  

You need to login to post a comment.