如何在hstore中对字符串到日期对象进行类型转换

时间:2015-10-19 05:27:30

标签: ruby-on-rails-3 postgresql hstore

到目前为止在hstore中的字符串字符串对象

我已经为这样的字符串做了类型转换 Project.where("(form_data -> '12')::int > 2")它工作正常,但无法将日期类型化为Project.where("(form_data -> '12-13-10-2016')::date > 22-102016")

它给了我错误 ActiveRecord::StatementInvalid: PG::Error: ERROR: schema "date" does not exist

1 个答案:

答案 0 :(得分:1)

我得到的答案是我在这里提出的问题是解决方案

Dim val As String val = GET_STRING_BETWEEN("bye", "hello bye see you", "you") 'val="bye see you"

我提到this