Select DATE_FORMAT(tanggal, "%W") AS `Nama_Hari_Eng`
, CASE DAYOFWEEK(tanggal)
WHEN 1 THEN 'Minggu'
WHEN 2 THEN 'Senin'
WHEN 3 THEN 'Selasa'
WHEN 4 THEN 'Rabu'
WHEN 5 THEN 'Kamis'
WHEN 6 THEN 'Jumat'
WHEN 7 THEN 'Sabtu'
END AS `Nama_Hari_ID`
from t_transaksi;
Tidak ada komentar:
Posting Komentar