new \DateTime('p.expirationAt', new \DateTimeZone('America/Sao_Paulo')) is
not a valid way to instantiate a DateTime object:
http://php.net/manual/en/class.datetime.php

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/

On 8 December 2014 at 19:28, João Carlos Santa Ana <
[email protected]> wrote:

> This also does not work!!
>
>    $query = $this->getEntityManager()->createQueryBuilder()
>               ->select("\DATE_FORMAT('p.expirationAt', '%Y %m')", 'p')
>               ->from('System\Entity\Payment', 'p' );
>
>
> Em segunda-feira, 8 de dezembro de 2014 14h18min25s UTC-2, João Carlos
> Santa Ana escreveu:
>
>> Hi, can help please
>> Thanks
>>
>>
>>
>>  $query = $this->getEntityManager()->createQueryBuilder()
>>               ->select('p.expirationAt', 'p')
>>               ->from('System\Entity\Payment', 'p' )
>>               ->groupBy(\date_format(new \DateTime('p.expirationAt', new
>> \DateTimeZone('America/Sao_Paulo')), 'Y-m'));
>>
>>
>> Failed to parse time string (p.expirationAt) at position 8 (t): Double 
>> timezone specification
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "doctrine-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/doctrine-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to