erlangbureau / jamdb_oracle

Oracle Database driver for Erlang
MIT License
106 stars 48 forks source link

How I add millisecond in naive_datetime or utn_datetime type #107

Closed thachtan closed 2 years ago

thachtan commented 2 years ago

I have some problem with save time with millisecond. How I save it in Oracle with jamdb_oracle

vstavskyi commented 2 years ago

example

Ecto.Adapters.SQL.query(YourApp.Repo, "update tabl set tim=:1", [{{2022,2,24}, {4,0,0,123000}}])

vstavskyi commented 2 years ago

Recommend using functions like TO_DATE etc.

thachtan commented 2 years ago

Thank you for this example with query.

But I want to set millisecond with type :naive_datetime_usec or :utc_datetime_usec in change set and timestamps.

vstavskyi commented 2 years ago

try now commit

thachtan commented 2 years ago

It works!!! Thanks you for take time to help this issue ^^