number of days in view

  • Hi Friend.

    i wanto calculate number of days from past to now in view. there is a code from my view.

    CONVERT(varchar(20), TbC.DtContactDate, 104) AS StContactDate and that query gives me 02.02.2009 but i have to show like that 02.01.2009(before 14 days). shortly how can i counting number of day from past to today.

    Regards.

  • This will get the number of days between today and the date in the DtContactDate column:

    DATEDIFF(dd, DtContactDate, GetDate()) AS NumberOfDays

    Greg

  • ok, solved :).

    thank you very much Greg.

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

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