Selecting date before 6 months

  • Hi,

    i want select date which is before 6 month from todays date in parameter property of reporting.Can anybody tel me how to do this?

    Please give me reply asap.

  • in TSQL, you'll want to use the DATADD function. when you add a negative number, it subtracts it from the date: you can use it to add or subtract any period of time: years/months/days etc

    SELECT

    getdate() as TodaysDate,

    DATEADD(mm,-6,getdate()) as Date6MonthsAgo

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply