Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Small method to calculate since time
Message
From
04/10/2011 08:42:38
 
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01525501
Message ID:
01525534
Views:
47
>Certainly looks like a lot of code :-}
>How about:
Dim earlierDate As New DateTime(2009, 9, 15, 10, 40, 20)
>Dim timespan As TimeSpan = DateTime.Now.Subtract(earlierDate)
>Dim difference As New DateTime(timespan.Ticks)
>Console.WriteLine("Years: {0} Months: {1} Days {2}", difference.Year, difference.Month, difference.Day)
>
Thanks, but Console.WriteLine() doesn't do anything in my application.

Also, I tried to replace that to Message.Box() but was unable do. Basically, how can we get the equivalent into a variable?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform