How to get WHMCS date format?
To know the date format is set in the WHMCS, we can use the below query.
$date_format = Capsule::table('tblconfiguration') ->where('setting', '=', 'DateFormat') ->value('value');
Some of the example date formats are MM-DD-YYYY, MM/DD/YYYY, DD-MM-YYYY etc.
We can convert that to the classical d m Y format by using the below code.
$date_format = str_replace("DD", "d", $date_format); $date_format = str_replace("MM", "m", $date_format); $date_format = str_replace("YYYY", "Y", $date_format);