•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 392,060 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,240 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser:
Views: 3903 | Replies: 5 | Solved
![]() |
Use the SQL DATEDIFF function.
DATEDIFF( datapart, date_expression1, date_expression2)
i.e.
Hope that helps
Happy coding
DATEDIFF( datapart, date_expression1, date_expression2)
i.e.
DATEDIFF (year, '1/1/1999', '1/1/2000') would give 1 as a result
Hope that helps
Happy coding
Assistant Manager, Regional Pharmacy Information Systems
TLC Services Website (Under Construction)
Updated : ASP.Net Login Code
TLC Services Website (Under Construction)
Updated : ASP.Net Login Code
Tricky?
And what does Javascript have to do with SQL functions?
The function is simple.... how is it tricky?


And what does Javascript have to do with SQL functions?
The function is simple.... how is it tricky?


•
•
•
•
Originally Posted by Electrohead04
Sounds tricky! Maybe you could adapt a javascript to suit your needs?
Assistant Manager, Regional Pharmacy Information Systems
TLC Services Website (Under Construction)
Updated : ASP.Net Login Code
TLC Services Website (Under Construction)
Updated : ASP.Net Login Code
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb MS SQL Marketplace
- calculate image property in javascript (JavaScript / DHTML / AJAX)
- Factorial Calculate (VB.NET)
- calculate the grades for a student using if..else statements. (Java)
- Calculate the factorial of a number (Visual Basic 4 / 5 / 6)
Other Threads in the MS SQL Forum
- Previous Thread: Select records from different data source
- Next Thread: Need suggestion to select application language


Linear Mode