Answers for "check if valid date format entered inside the excel import php"

PHP
0

check if valid date format entered inside the excel import php

try {
  Date::excelToDateTimeObject(trim($row[5]))->format('Y-m-d');
} catch (Exception $exception) {
  throw ValidationException::withMessages([
    'file' => "contains incorrect date format, should be in Y-m-d format"]
  ]);
}
Posted by: Guest on January-07-2022

Code answers related to "check if valid date format entered inside the excel import php"

Browse Popular Code Answers by Language