Created
August 12, 2019 20:55
-
-
Save delonnewman/c28584b4bdb17c0061acfddc18f85f8e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# model | |
class Referral | |
attributes :ended_at, :datetime | |
end | |
# migration | |
class CreateReferrals ... | |
def change | |
create_table :referrals do |t| | |
... | |
t.date :ended_at | |
end | |
end | |
end | |
# Query | |
Referral.where(id: id, referral_status_id: status_id).update_all(ended_at: DateTime.now) | |
# throws the error 'OCIError: ORA-01830: date format picture ends before converting entire input string:' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment