|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Q: datetime differenceHello
I have TextBox1 this keeps date and time information and I need to compare this DateTime with the current DateTime and find difference in hour. How can I do this in VB.Net? Thanks, Yes. If d1 and d2 are both dates:
dt.Subtract(d2).TotalHours I am not sure how your textbox contains the date and time, but you need to parse that out into a date object. Show quoteHide quote "JIM.H." <J***@discussions.microsoft.com> wrote in message news:10AA571D-FC52-4895-9079-215A97FBD8E3@microsoft.com... > Hello > I have TextBox1 this keeps date and time information and I need to compare > this DateTime with the current DateTime and find difference in hour. How > can > I do this in VB.Net? > > Thanks, >
Other interesting topics
possible java script question
FxCop App Security asp:Wizard inside of a asp:FormView breaks two-way databinding Problem with porting 1.1 code to 2.0 Web access failed - need help Can't get rid of the time part of a date Check textbox value... Syntax error about daAngio.Fill(dsAngio, "AngioInfo") Why aren't master pages part of themes? ASP Web site references to dlls |
|||||||||||||||||||||||