How do I get the day name from a timestamp datatype in MySQL?
2013-01-01 15:00:28
should return Tuesday
SELECT DAYNAME('2013-01-01 10:10:10');
Short day name example. This will return 'Tue':
SELECT DATE_FORMAT('2013-01-01 15:00:28','%a') as dayname;
Long day name example. This will return 'Tuesday':
SELECT DAYNAME('2013-01-01 15:00:28') as dayname;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With