We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
請問TypeORM的createQueryBuilder的groupBy時,可以像MYSQL將date格式用DATE_FORMAT轉為YYYY-MM-DD作為groupBy嗎?
The text was updated successfully, but these errors were encountered:
这个没有试过,group by 里面传的是一个字符串,你可以把DATE_FORMAT函数传进去试试
Sorry, something went wrong.
單純的用select方式會出現Error: 'DATE_FORMAT' is not a recognized built-in function name.
const test = await this.clickLogRepository.createQueryBuilder('click') .select(`DATE_FORMAT(click.createDate,'%Y%m%d')`) .getRawMany(); return test;
參考 http://www.rainsho.cc/blog/0015309585170986b38104a2607421da7884c0705020b66000
No branches or pull requests
請問TypeORM的createQueryBuilder的groupBy時,可以像MYSQL將date格式用DATE_FORMAT轉為YYYY-MM-DD作為groupBy嗎?
The text was updated successfully, but these errors were encountered: