Last active
July 9, 2021 02:06
-
-
Save AgungPambudi/5424bf1c8f854ba9b547b534806dbd9b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#author : Agung Pambudi | |
#email : mail@agungpambudi.com | |
#version : 0.1 | |
#============================================================================== | |
# _ _ _ | |
# ___ ___ _ _ ___ ___ ___ ___ _____| |_ _ _ _| |_| ___ ___ _____ | |
#| .'| . | | | | . | . | .'| | . | | | . | |_| _| . | | | |
#|__,|_ |___|_|_|_ | _|__,|_|_|_|___|___|___|_|_|___|___|_|_|_| | |
# |___| |___|_| | |
SELECT CAST(DATE_FORMAT(DATE(TANGGAL),'%Y-%m-%d') as date) FROM tablename; | |
SELECT DATE_FORMAT(STR_TO_DATE(TANGGAL, '%d-%m-%Y'), '%Y-%m-%d') AS TANGGAL FROM tablename; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment