DateTime.Compare output

M

Martin Eyles

Hi,

What is the unit of the output from DateTime.Compare.

Seconds, minutes, hours or days? or something else

Thanks,
Martin
 
A

Anant

Martin said:
Hi,

What is the unit of the output from DateTime.Compare.

Seconds, minutes, hours or days? or something else

Thanks,
Martin


Hi Martin,
The DateTime.Compare method returns a relative value
denoting which of the two instances being compared is greater. I dont
think this return value in any case relates to the actual seconds,
hours or minutes of the two instances.
Here is a msdn link so that my point is clear to you

http://msdn2.microsoft.com/en-us/library/system.datetime.compare.aspx

Thanks !
 
M

Martin Eyles

Anant said:
The DateTime.Compare method returns a relative value
denoting which of the two instances being compared is greater. I dont
think this return value in any case relates to the actual seconds,
hours or minutes of the two instances.
Here is a msdn link so that my point is clear to you

http://msdn2.microsoft.com/en-us/library/system.datetime.compare.aspx

I understand. I want to get the difference between these two in seconds. Do
you know of a way to do this?

Thanks again,

Martin
 
M

Martin Eyles

Very neat, but I get the error "Operator '-' is not defined for types 'Date'
and 'Date'."
 
M

Martin Eyles

Thanks!

This works. It is a shame I can't use operator overloading in VB.net.
Perhaps I should switch to C# - I like some of its other syntax better too -
'{' and '}' for code blocks is much better than 'END'. That may have to wait
till my next project though - too much code to convert otherwise.

Martin
 
G

Guest

yes u can do that thro web.. that helps us..
http://msdn.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPost
see this snippet i took from msdn help..
isnt it possible in usenet

Rate a post as an answer (or not an answer) to your question
(Note that you cannot rate a post that you have authored.)

When someone replies to a question you asked, you can rate this post as an
answer, or not an answer to your question. By rating a post as an answer, you
help others find the answer more quickly, you give credit to the person who
posted the answer, and you help increase the quality of answers in the
discussion group.

In the thread pane, select the post that is a response to a question you
asked.
In the message pane, do one of the following:
If the post answers your question, click Yes next to Did this post answer
the question?
If the message was not helpful to you, click No next to Did this post answer
the question?
The post you rated is now marked as an answer, and the thread is now marked
as an answered question, and will be returned in search results.
Additionally, the person who posted this answer is credited with an answered
question (this is added to their profile information).
 
M

Martin Eyles

Y2KPRABU said:
yes u can do that thro web.. that helps us..
http://msdn.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPost
see this snippet i took from msdn help..
isnt it possible in usenet

I am not using the web to read this newsgroup, I am using usenet. I do not
know of any facility in any usenet client to add ratings to articles,
although admitedly I am using one of the less featured usenet clients,
Outlook Express. For info about usenet, see the wikipedia article

http://en.wikipedia.org/wiki/USENET

Also, I should point out that you are bound to meet a much more angry
response from a lot of usenet users - take a look at this url for an example

http://www.google.com/search?q="not+a+web+forum"

In any case, I'll be more restrained,

Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top