php 날짜 한달후 계산 정보
php 날짜 한달후 계산
본문
            
            
                        앞 단에서 그누보드 달력을 통해 $svc_bsn 을 문자열로 받을경우
20131102 에서 2013-11-02 형태로 바꾸고 한달 더하는 패턴
echo $originalDate = $svc_bsn;
echo '<br>';
echo $newDate = date("Y-m-d", strtotime($originalDate));
echo $time = strtotime($newDate);
echo $final = date("Y-m-d", strtotime("+1 month", $time));
                
                
                20131102 에서 2013-11-02 형태로 바꾸고 한달 더하는 패턴
echo $originalDate = $svc_bsn;
echo '<br>';
echo $newDate = date("Y-m-d", strtotime($originalDate));
echo $time = strtotime($newDate);
echo $final = date("Y-m-d", strtotime("+1 month", $time));
                        
                추천
                
0
                
    0
댓글 3개

                
                    흠;; 유용한 정보 감사합니다. ^^                
                
                
            
                    
                
                    감사합니다 ^&^                
                
                
            
                    
//앞 단에서 그누보드 달력을 통해 $svc_bsn 을 문자열로 받을경우 
//20131102 에서 2013-11-02 형태로 바꾸고 한달 더하는 패턴 
echo $originalDate = $svc_bsn; 
echo '<br>'; 
echo $newDate = date("Y-m-d", strtotime($originalDate)); 
echo $time = strtotime($newDate); 
echo $final = date("Y-m-d", strtotime("+1 month", $time));