I have the following code. If I do the dateadd function with
dateinterval.mi nute, it works fine and the date/time value is displayed with
zero seconds. If I do the dateadd function with dateinterval.se cond, an
error is thrown saying I have an overflow. I would be happy to know if I am
doing something wrong or if I could do it differently to get the seconds to
display properly.
Const largeInteger As Long = &H1C5EA3B5F585F 1F
Const dateRef As Date = #1/1/1601#
TextBox1.Text = CStr(DateAdd(Da teInterval.Minu te, CDbl(largeInteg er
/ (60 * 10000000)), dateRef))
'TextBox1.Text = CStr(DateAdd(Da teInterval.Seco nd, CDbl(largeInteg er
/ 10000000), dateRef))
I am doing this in Visual Web Developer Express.
dateinterval.mi nute, it works fine and the date/time value is displayed with
zero seconds. If I do the dateadd function with dateinterval.se cond, an
error is thrown saying I have an overflow. I would be happy to know if I am
doing something wrong or if I could do it differently to get the seconds to
display properly.
Const largeInteger As Long = &H1C5EA3B5F585F 1F
Const dateRef As Date = #1/1/1601#
TextBox1.Text = CStr(DateAdd(Da teInterval.Minu te, CDbl(largeInteg er
/ (60 * 10000000)), dateRef))
'TextBox1.Text = CStr(DateAdd(Da teInterval.Seco nd, CDbl(largeInteg er
/ 10000000), dateRef))
I am doing this in Visual Web Developer Express.
Comment