-5

I use SQL Anywhere Database. When I add one second to 00:00:00, it becomes 12:00:01 AM. In my C++ code end, it crashes saying it's an invalid time.

select top 1 DATEPART(HOUR, trans ),trans, DATEADD(second, 1, trans ),CAST('2015-01-01 00:00:01' AS DATETIME) AS LedgerDateTime from pay

enter image description here

Why does it behave like this?

Zhang
  • 3,030
  • 2
  • 14
  • 31

1 Answers1

-1

OK, I looked up.

12:00:01 AM is a valid time.

The reason for the crash maybe because of the lacking of memory.

enter image description here

The data volumn is too big for my computer.

Zhang
  • 3,030
  • 2
  • 14
  • 31