그누달력 날짜로 변환하는법좀 알려주세요 ㅠ 정보
그누달력 날짜로 변환하는법좀 알려주세요 ㅠ
본문
그누회원가입할때 생일입력할때,
20081012
이런식으로 날짜가 적히는데..
date 함수쓰면 70년대로 나오고...
이런식의 날짜를 일반적인 날짜로 (08년 10월 12일) 바꾸는 방법이나
아니면 date함수로 수정되게 할 수 있는 방법 있다면 알려주세요~
20081012
이런식으로 날짜가 적히는데..
date 함수쓰면 70년대로 나오고...
이런식의 날짜를 일반적인 날짜로 (08년 10월 12일) 바꾸는 방법이나
아니면 date함수로 수정되게 할 수 있는 방법 있다면 알려주세요~
댓글 전체
mysql> desc g4_member;
+-------------------+--------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------------+--------------+------+-----+---------------------+----------------+
| mb_no | int(11) | | PRI | NULL | auto_increment |
| mb_id | varchar(255) | | UNI | | |
| mb_birth | varchar(255) | | | | |
http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html#function_str-to-date
select ..., STR_TO_DATE( mb_birth, '%Y%m%d') from g4_mebmer ....
+-------------------+--------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------------+--------------+------+-----+---------------------+----------------+
| mb_no | int(11) | | PRI | NULL | auto_increment |
| mb_id | varchar(255) | | UNI | | |
| mb_birth | varchar(255) | | | | |
http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html#function_str-to-date
select ..., STR_TO_DATE( mb_birth, '%Y%m%d') from g4_mebmer ....
echo date('Y년 m월 d일', strtotime($member['mb_birth']));