[프로그래머스/SQL]DATETIME에서 DATE로 형 변환

gov's avatar
Dec 10, 2024
[프로그래머스/SQL]DATETIME에서 DATE로 형 변환
Contents
문제풀이

문제

notion image

풀이

date_format(’날짜’ 또는 날짜 칼럼명, '%Y-%m-%d')
  • %Y-%m-%d : 2024-12-10 형식 출력. Y는 대문자
SELECT animal_id, name, date_format(datetime, '%Y-%m-%d') as '날짜' from animal_ins order by animal_id
Share article

goho