Ruby on Rails中的SQL错误:“(完整)年份必须介于-4713和+9999之间,而不是0”

时间:2012-04-20 05:48:53

标签: ruby-on-rails

我在Ruby中使用以下查询:

mcuglist = Balsiebeltogenevaprodmapping.find_by_sql ["select * from master_cug_list where customer_ref = ? and product_seq = ? and end_date = ? and line_seq is null order by directory_number",bseq_11.customer_ref,bseq_11.product_seq,(accdtlmap.start_dat.to_date + 9).strftime('%Y-%m-%d')]

它给了我标题中给出的错误:(full) year must be between -4713 and +9999, and not be 0

如何了解如何将date传递给find_by_sql query

0 个答案:

没有答案