문제

이 날짜를 어떻게 변환 할 수 있습니까?

2009-12-21 10:38:07

더 읽기 쉬운 날짜와 같이 22 December 2009 - 10:38 ?

도움이 되었습니까?

해결책

당신은 사용할 수 있습니다 date 기능 strtotime:

$strDate = "2009-12-21 10:38:07";
echo date('d F Y - H:i', strtotime($strDate));

다른 팁

// Prints: July 1, 2000 is on a Saturday
echo "July 1, 2000 is on a " . date("l", mktime(0, 0, 0, 7, 1, 2000));
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top