473,385 Members | 1,912 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 2475
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: dlx_son | last post by:
Here is the code so far <form name="thisform"> <h3>Enter time to add to or subtract from:</h3> (If not entered, current time will be used)<br> Day: <input name="d1" alt="Day of month"...
3
by: Michael Schindler | last post by:
ROW Accountnr Amount 1 1001 12.00 2 1001 -12.00 3 1002 40.00 4 1002 -12.00 5 1002 ...
25
by: Joel Barsotti | last post by:
In the current application I'm working on I'm using floating point variables to store price information in a shopping cart. When I go to do % based discounts I make sure to round and truncate my...
4
by: Lee | last post by:
Hi All, I have a datetime field and want to subtract 24 (or any other number of) hours from it. How would I go about this? Thanks Lee
3
by: ReidarT | last post by:
I have a javascript where I try to add 1 to a value through a button and show the value in a textbox and subtract 1 from another button and show the result in the same textfield. This seems to...
2
by: charles.elias | last post by:
I am very new to Access. I have created a database in Access 2003. I can enter the required record fields from a form. I would like to add a feature that allows a user to update the "quantity"...
2
by: doomsday123 | last post by:
I want to create a query that will subtract a given number from a value in the database and store it in the same spot the value was. For example, a customer has a balance of 23.22 which is stored...
1
by: andy143vivi | last post by:
hi, i have a query from 5 tables, and i want to make one of the field to subtract the value from another field, sample: field1: field2: 5 2 4 ...
3
by: abueno | last post by:
Ok, I have an if statement, and the user enters a value outside of the range.... say: int sco; //Variable used for score. if(sco< 0 || sco > 100) { cout<<"Error, You have to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.