In Visual Basic
Friend Const xxx As UInt64 = 400 * 365 * 24 * 60 * 60 ''// Number of secs in 400 years
This fails with the error
constant expression not representable in type integer
The problem is 400 * 365 * 24 * 60 * 60 is larger than 2^32
I would have thought that by declaring the constant to be UInt64 that it would be OK to assign a 64 bit value to it
Aside from the fact that there are slightly more than 365 days each year (you need to add 97 leap days), each of the values that are multiplied to make up your constant are integer literals, and therefore until you assign them to the UInt64 it’s all done in integer space. Try this: