Teee (6/19/2013)
Hi All,I need to return the minimum date from my table and manipulate it so it starts from the first of the month
e.g 2012-06+'-'+'01+ and use this as the minimum date: '2012-06-01- instead of the 22nd
Select MIN(dtePostedToWebsiteDate) --Here's the minimum date >>> 2012-06-22 09:07:42.413
FROM dtlVacancyPostAudit
How do I achieve this?
Thanks
Teee
Select DATEADD(MONTH, DATEDIFF(MONTH, 0, MIN(dtePostedToWebsiteDate)), 0)
FROM dtlVacancyPostAudit;
Or
Select CAST(DATEADD(MONTH, DATEDIFF(MONTH, 0, MIN(dtePostedToWebsiteDate)), 0) AS DATE)
FROM dtlVacancyPostAudit;