Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Small method to calculate since time
Message
 
 
À
04/10/2011 09:27:33
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01525501
Message ID:
01525545
Vues:
32
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform