MySQL 列中的日期差异

Datediff in columns in MySQL

我想在 mySQL 中使用 datediff 函数,但我的代码返回 Null,我认为这是因为我使用的列的格式为 MM/DD/YYYY。我怎么能过来这个。这是我的代码。

select p.`Brand.Name`, datediff( 'p.`Pdo.Date`', 'f.`EntryDate`') from packaging as p
join volumes as v using(batchNum)
join fermentation as f on v.`LineNum` = f.`QC.LineId` 
group by `Brand.Name`;

使用STR_TO_DATE将文本转换为日期

select p.`Brand.Name`, datediff( STR_TO_DATE(`p`.`Pdo.Date`,"%m/%d/%Y"), STR_TO_DATE(`f`.`EntryDate`,"%m/%d/%Y")) 
from packaging as p
join volumes as v using(batchNum)
join fermentation as f on v.`LineNum` = f.`QC.LineId` 
group by `Brand.Name`;