2013-04-08 php 日付の形式をゼロ詰めする PHP $ymd = "2013-04-5"; $fmt_ymd = date("Y-m-d", strtotime($ymd)); print_r($fmt_ymd); -> "2013-04-05"