Skip to content

Inserting/updating DateTime attributes truncates milliseconds #768

Description

@JamalQasem

A colleague reported this issue against our data access layer and we noticed that the milliseconds are missing in the SqlKata generated statement. We suspect

if (value is DateTime date)
{
if (date.Date == date)
{
return "'" + date.ToString("yyyy-MM-dd") + "'";
}
return "'" + date.ToString("yyyy-MM-dd HH:mm:ss") + "'";
}
these lines to be the cause of the issue. Is this intended behaviour?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions