Start Date, end date dynamic parameter

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • boomingranny
    New Member
    • Dec 2016
    • 1

    Start Date, end date dynamic parameter

    I've been asked to edit a script. Several of the select statements have date parameters in the where clause. I'm trying to write a simple @Start_date and @End_Date. The fields are DATETIME. I need to get the first of the month in MMYYYY format for the @Start_Date and the last of the month in the same format for @End_Date. I'm new to sql server.
    SO far
    DECLARE @Start_Date DATETIME
    SET (How to pass first date of the entered MMYYYY?)

    ditto for @end date

    Thanks!
Working...