0

So if I run a virtual instance of IIS on localhost to test some site, I have a datebase field with a default CURRENT_TIMESTAMP that upon insertion always defaults to 1/1/0001 12:00:00 AM, which is, as I understand, the null-like value for DateTime in these scenarios.

Why is this happening? Can't I get the actual time and date to go in this field?

I've tried using getdate(), sysdatetime() and whichever else alternatives and it's the same thing.

The field in the C# code is:

public DateTime LastModification { get; set; }

Any workaround around this?

I'm using the correct mappings as per msdn

user3046061
  • 353
  • 4
  • 14

0 Answers0