如何使用带有指定格式字符串的doctrine 2的CURRENT_DATE()函数?

I have no idea how to set specified date format to query with CASE WHEN. What i try to do is to create a select that will look like one bellow.

$qb -> select('
              CASE WHEN ps.paymentDate >= (new \DateTime(\'%Y-%m-01\')) THEN \'true\' ELSE \'false\' END as myVar
');

I looked for the solution in the internet but i haven't found it. Am i thinking about the whole problem right?

Previous code in mysql looked like this:

IF(ps.payment_date >= DATE_FORMAT(CURDATE(),\'%Y-%m-1\'),\'true\',\'false\') as myVar   

Like this,

$d = new \DateTime();
$sd = $d->format('Y-m-01');
$qb -> select("CASE WHEN ps.paymentDate >= '$sd' THEN 'true' ELSE 'false' END as myVar");

Or

$q = "IF(ps.payment_date >= DATE_FORMAT(CURDATE(),'%Y-%m-01'),'true','false') as myVar";

NOTE: If you use single quotes inside a Double quoted string literal, you can dispense with all those escape characters which just server to confuse the eye. Also $variables are automatically expanded inside a double quoted string.