adding a day to a month

  • Hello friend,

     

    i have a problem which i tried a lot  to solve but did not able to,

    here is the problem, there are two columns (checkin, checkout)datatime, and based on the parameter value passed to check in  as datename month, then it should return the values for the month from 2nd of the selected month to 1st of next month of selected month.

     

    it will be great help .....

  • I did not totally follow what you are trying to say; but, suggest trying to add the dateadd function to your SQL... as follows

    dateadd(day, 1, checkin) AS checkout

    for more details see MSDN at

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_da-db_3vtw.asp

    Hope this helps.


    Cheers,

    david russell

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

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