Advertisement

04.03.2008 at 02:13PM PDT, ID: 23294268
[x]
Attachment Details

SQL server date add format

Asked by Mittensonmaui in MS SQL Server

Aloha I need to fix the following

  -(DATEDIFF(wk, dateadd(mm,3,@StartDate), dateadd(mm,4,@StartDate))  * 2)

the second dateadd function should subtract -1 how do I set that up? otherwise it goes to the first day of the next month. I want the last day of the current month.Start Free Trial
[+][-]04.03.2008 at 02:34PM PDT, ID: 21277178

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.07.2008 at 08:53AM PDT, ID: 21298104

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MS SQL Server
Sign Up Now!
Solution Provided By: mark_wills
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628