tag:blogger.com,1999:blog-2886789781940464032.post8261102590782397623..comments2023-09-30T10:36:02.745+03:00Comments on Sql Server knowledge sharing blog: first and last date of Month,Quarter,Week and year.Shamas DBAhttp://www.blogger.com/profile/01894071527133572968noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-2886789781940464032.post-49771380076855878042011-04-08T13:47:47.874+03:002011-04-08T13:47:47.874+03:00This function will return Last, First, Previous da...This function will return Last, First, Previous days of month with 00.00 time. If i want to return Maximum time 23.59 then I have to do this.<br /><br />This is for last day of month.<br />SELECT DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0))<br /><br />Chaging mm to s in DateAdd function.Shamas DBAhttps://www.blogger.com/profile/01894071527133572968noreply@blogger.comtag:blogger.com,1999:blog-2886789781940464032.post-10778014273595274202010-04-11T22:16:13.194+03:002010-04-11T22:16:13.194+03:00I need first and last date of month and it helps m...I need first and last date of month and it helps me.<br /><br /><br />Thanks for sharing this on blog.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2886789781940464032.post-6700341252828612152009-10-21T09:09:02.256+03:002009-10-21T09:09:02.256+03:00it really a good tips thanks.it really a good tips thanks.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2886789781940464032.post-29130602934625492032009-08-27T08:57:03.986+03:002009-08-27T08:57:03.986+03:00Thanks, I got greate help from this post.Thanks, I got greate help from this post.Hammadhttps://www.blogger.com/profile/09159775579839706240noreply@blogger.comtag:blogger.com,1999:blog-2886789781940464032.post-52696152722645096212009-08-20T11:34:59.068+03:002009-08-20T11:34:59.068+03:00Thanks, It is helpful to me . I have used it to re...Thanks, It is helpful to me . I have used it to return week and day.Anonymoushttps://www.blogger.com/profile/06654786792632486119noreply@blogger.com