468,140 Members | 1,613 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,140 developers. It's quick & easy.

dateteime subtract strange value

Why Now.Date.Subtract(New Date(2000, 1, 1)).Days returns 731529??
It is a too big value a think! I aspect something as 1030-1100....


Nov 20 '05 #1
10 2301
"Trapulo" <no**********@qui.it> schrieb
Why Now.Date.Subtract(New Date(2000, 1, 1)).Days returns 731529??
How do you display the value?
It is a too big value a think! I aspect something as 1030-1100....


Your expression returns 1410 here. (Framework 1.1)
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
"Armin Zingler" <az*******@freenet.de> wrote in message
news:eG****************@TK2MSFTNGP12.phx.gbl...
"Trapulo" <no**********@qui.it> schrieb
Why Now.Date.Subtract(New Date(2000, 1, 1)).Days returns 731529??
How do you display the value?


on command window (I'm debugging... ) :

? Now.Date.Subtract(New Date(2000, 1, 1)).Days
It is a too big value a think! I aspect something as 1030-1100....


Your expression returns 1410 here. (Framework 1.1)


It seems right. I'm using 1.1 too.

:-(((((((((((((((

Nov 20 '05 #3
"Trapulo" <no**********@qui.it> schrieb

How do you display the value?


on command window (I'm debugging... ) :

? Now.Date.Subtract(New Date(2000, 1, 1)).Days
It is a too big value a think! I aspect something as
1030-1100....


Your expression returns 1410 here. (Framework 1.1)


It seems right. I'm using 1.1 too.


You are right. Can reproduce it here. Problem is: "New date(2000, 1, 1)"
does _not_ return 1/1/2000. Instead it returns 1/1/0001. But only in the
debugger (also when viewing "New date(2000, 1, 1)" in the quick watch
window), not when executed in code. I'm still trying to find out why...

(BTW, date literals can be expressed by #1/1/2000# (not a solution for the
problem, only a hint))
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #4

"Armin Zingler" <az*******@freenet.de> wrote in message
news:OX**************@TK2MSFTNGP09.phx.gbl...
"Trapulo" <no**********@qui.it> schrieb
You are right. Can reproduce it here. Problem is: "New date(2000, 1, 1)"
does _not_ return 1/1/2000. Instead it returns 1/1/0001. But only in the
debugger (also when viewing "New date(2000, 1, 1)" in the quick watch
window), not when executed in code. I'm still trying to find out why...


That's right. It think is a bug of VS.Studio (where is MS people in this
newsgroup?).
(BTW, date literals can be expressed by #1/1/2000# (not a solution for the problem, only a hint))


In fact if I use this notation, also in the debugger I have the right value.

Thanks
Nov 20 '05 #5
"Trapulo" <no**********@qui.it> schrieb

"Armin Zingler" <az*******@freenet.de> wrote in message
news:OX**************@TK2MSFTNGP09.phx.gbl...
"Trapulo" <no**********@qui.it> schrieb
>

You are right. Can reproduce it here. Problem is: "New date(2000,
1, 1)" does _not_ return 1/1/2000. Instead it returns 1/1/0001. But
only in the debugger (also when viewing "New date(2000, 1, 1)" in
the quick watch window), not when executed in code. I'm still
trying to find out why...


That's right. It think is a bug of VS.Studio (where is MS people in
this newsgroup?).


They are here. :-) I believe this is a managed group, so they are monitoring
it - maybe someone will answer in the next few days.

Maybe you can also post it to the microsoft.public.vsnet.debugging or
microsoft.public.vsnet.ide group (don't know which one, probably the first
is more appropriate). I've already received an answer there from MSFT people
that forwarded an issue to the development team, so I think there is a good
chance to get an answer there.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #6
Cor
Hi Trapulo,

As addition to Armin,

Put in your Subject "BUG" I have seen Microsoft people react almost
imidiatly at that.

Cor
Nov 20 '05 #7
Armin: Monitoring is what we are doing. When you are involved that's all
we usually need to do. <g>

Trapulo: This certainly looks like a bug to me. As Armin said, New Date
always returns 1/1/01 in the command window.

I've submitted a bug report to the product team. If they concur, the bug
will be prioritized and hopefully fixed.

Thank you for choosing the MSDN Managed Newsgroups,

John Eikanger
Microsoft Developer Support

This posting is provided “AS IS” with no warranties, and confers no rights.
--------------------
| From: "Armin Zingler" <az*******@freenet.de>
| Subject: Re: dateteime subtract strange value
| Date: Wed, 12 Nov 2003 11:27:39 +0100
| Lines: 31
| Newsgroups: microsoft.public.dotnet.languages.vb
|
| "Trapulo" <no**********@qui.it> schrieb
| >
| > "Armin Zingler" <az*******@freenet.de> wrote in message
| > news:OX**************@TK2MSFTNGP09.phx.gbl...
| > > "Trapulo" <no**********@qui.it> schrieb
| > > > >
| > > You are right. Can reproduce it here. Problem is: "New date(2000,
| > > 1, 1)" does _not_ return 1/1/2000. Instead it returns 1/1/0001. But
| > > only in the debugger (also when viewing "New date(2000, 1, 1)" in
| > > the quick watch window), not when executed in code. I'm still
| > > trying to find out why...
| >
| > That's right. It think is a bug of VS.Studio (where is MS people in
| > this newsgroup?).
|
| They are here. :-) I believe this is a managed group, so they are
monitoring
| it - maybe someone will answer in the next few days.
|
| Maybe you can also post it to the microsoft.public.vsnet.debugging or
| microsoft.public.vsnet.ide group (don't know which one, probably the first
| is more appropriate). I've already received an answer there from MSFT
people
| that forwarded an issue to the development team, so I think there is a
good
| chance to get an answer there.
|
|
| --
| Armin
|
| http://www.plig.net/nnq/nquote.html
| http://www.netmeister.org/news/learn2quote.html
|
|

Nov 20 '05 #8
Hello John,

* jo****@online.microsoft.com ("John Eikanger") scripsit:
Armin: Monitoring is what we are doing. When you are involved that's all
we usually need to do. <g>


:-)

Is there a specific place where "bugs" can be submitted?

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #9
Send them to Rafael and Ed. hundreds & hundreds of them! ;-)

Actually, MVPs should create a post in the private newsgroup for their
technology with the keyword MS-ESC in the title. That will do you better
than the mswish website. As someone said >somewhere<, starting the subject
line with BUG has a tendency to get noticed by the developers when they are
in the newsgroups. As with anything of this type, if you use it too often,
the devs may start to ignore it.

HTH

John Eikanger
Microsoft Developer Support

This posting is provided “AS IS” with no warranties, and confers no rights.

--------------------
| From: hi***************@gmx.at (Herfried K. Wagner [MVP])
| Newsgroups: microsoft.public.dotnet.languages.vb
| Subject: Re: dateteime subtract strange value
| Date: 12 Nov 2003 22:56:00 +0100
| Lines: 16

| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| Hello John,
|
| * jo****@online.microsoft.com ("John Eikanger") scripsit:
| > Armin: Monitoring is what we are doing. When you are involved that's
all
| > we usually need to do. <g>
|
| :-)
|
| Is there a specific place where "bugs" can be submitted?
|
| --
| Herfried K. Wagner
| MVP · VB Classic, VB.NET
| <http://www.mvps.org/dotnet>
|
| <http://www.plig.net/nnq/nquote.html>
|

Nov 20 '05 #10
* jo****@online.microsoft.com ("John Eikanger") scripsit:
Send them to Rafael and Ed. hundreds & hundreds of them! ;-)
:-)
Actually, MVPs should create a post in the private newsgroup for their
technology with the keyword MS-ESC in the title. That will do you better
than the mswish website.
I already knew that but I was interested if there is any other
"official" way than "MS Wish" to report a bug.
As someone said >somewhere<, starting the subject
line with BUG has a tendency to get noticed by the developers when they are
in the newsgroups. As with anything of this type, if you use it too often,
the devs may start to ignore it.


ACK. Thank you for clarifying that!

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Michael Schindler | last post: by
25 posts views Thread by Joel Barsotti | last post: by
4 posts views Thread by Lee | last post: by
3 posts views Thread by ReidarT | last post: by
2 posts views Thread by charles.elias | last post: by
2 posts views Thread by doomsday123 | last post: by
27 posts views Thread by didacticone | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.