Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Small method to calculate since time
Message
From
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:
01525543
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?
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