Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Number Of Days Between Dates
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01426473
Message ID:
01426475
Views:
55
Hi Kevin,

One method would be to use the T-SQL DATEDIFF ( datepart , startdate , enddate ) function.

Bill

>How do I calculate the number of days between two dates in SQL?
>
>
>SELECT APM_InvoiceDate - APM_DiscDate AS [VR-DSC-DAYS]
>	FROM iERP72_Test.dbo.APM
>
>
>This returns a datetime
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform