none
Get the day number from the date provided which should be Month to date and year to date RRS feed

  • Question

  • Please help me to get the day number from the date provided which should be Month to date and year to date
    Monday, January 6, 2020 8:25 AM

All replies

  • Please give examples, provided input data and required output. In your earlier thread on emp, dept tables as well, please provide required result. 

    Does below help?

    DECLARE @MyDate DATE
    SET @MyDate = getdate()
    
    SELECT @MyDate
    
    SELECT day(@MyDate)


    If the response helped, do "Mark as answer" and upvote it
    - Vaibhav

    Monday, January 6, 2020 10:49 AM