mdate([$datestr = ''[, $time = '']])
Parameters:
$datestr (string) – Date string
$time (int) – UNIX timestamp Returns:
MySQL-formatted date Return type:
string
This function is identical to PHP’s date() function, except that it lets you use MySQL style date codes, where each code letter is preceded with a percent sign, e.g. %Y %m %d
The benefit of doing dates this way is that you don’t have to worry about escaping any characters that are not date codes, as you would normally have t