Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Small method to calculate since time
Message
 
 
To
04/10/2011 09:27:33
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:
01525545
Views:
31
>>In SQL Server I got
>>declare @d datetime = '2009-09-15 10:40:20'
>>
>>select DATEDIFF(year, @d, CURRENT_TIMESTAMP) as [Years], 
>>DATEDIFF(month, @d, CURRENT_TIMESTAMP) as [Months], 
>>DATEDIFF(day, @d, CURRENT_TIMESTAMP) as [Days]
>>
>>2, 25, 749
>
>Can you try with:
>
>
>        Dim earlierDate As New DateTime(2007, 8, 5, 10, 15, 0)
>
>
>And, tell me the numbers you get?
Years	Months	Days
4	50	1521
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform