| Author |
Topic |
|
muzzettemm
Posting Yak Master
212 Posts |
Posted - 2008-12-29 : 14:00:29
|
| Hi all I have been trying to change the dates on here from showing 1 to the actualy Word January. Or 02 = February. And I'm not being very successful. How would I intergrate that into this procedure? The datatype for [Start_Date] is DATETIME[code]ALTER PROCEDURE [dbo].[YTDItDept]ASSELECT DATEPART(mm,Date) AS Month,MonthITAudtiCount,MonthInternalApplicationsCount,MonthMonitorCasinoIt_OpsProjCount,MonthInternalDatabaseMaintenance_SupportCount,MonthSecurityAdminstrationCount,MonthInvestigationsCount,MonthDesktopSupportCount,MonthProfessionalDevelopmentCount,YTDITAudtiCount,YTDInternalApplicationsCount,YTDMonitorCasinoIt_OpsProjCount,YTDInternalDatabaseMaintenance_SupportCount,YTDSecurityAdminstrationCount,YTDInvestigationsCount,YTDDesktopSupportCount,YTDProfessionalDevelopmentCountFROM (SELECT DATEADD(mm,DATEDIFF(mm,0,[Start_Date]),0) AS Date, sum(ITAudti) AS MonthITAudtiCount, sum(InternalApplications) AS MonthInternalApplicationsCount, sum(MonitorCasinoIt_OpsProj) AS MonthMonitorCasinoIt_OpsProjCount, SUM(InternalDatabaseMaintenance_Support) AS MonthInternalDatabaseMaintenance_SupportCount, sum(SecurityAdminstration) AS MonthSecurityAdminstrationCount, SUM(Investigations) AS MonthInvestigationsCount, SUM(DesktopSupport) AS MonthDesktopSupportCount, sum(ProfessionalDevelopment) AS MonthProfessionalDevelopmentCountFROM ITDepartmentGROUP BY DATEADD(mm,DATEDIFF(mm,0,[Start_Date]),0))tCROSS APPLY(SELECT SUM(ITAudti) AS YTDITAudtiCount, SUM(InternalApplications) AS YTDInternalApplicationsCount, SUM(MonitorCasinoIt_OpsProj) AS YTDMonitorCasinoIt_OpsProjCount, SUM(InternalDatabaseMaintenance_Support) AS YTDInternalDatabaseMaintenance_SupportCount, SUM(SecurityAdminstration) AS YTDSecurityAdminstrationCount,SUM(Investigations) AS YTDInvestigationsCount,SUM(DesktopSupport) As YTDDesktopSupportCount,SUM(ProfessionalDevelopment) As YTDProfessionalDevelopmentCountFROM ITDepartmentWHERE [Start_Date] <DATEADD(mm,1,Date))t1[/CODE] |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-29 : 14:08:27
|
| use DATENAME(mm,Date) to get month names as January,February,...rather than numbers 1,2.. |
 |
|
|
muzzettemm
Posting Yak Master
212 Posts |
Posted - 2008-12-29 : 14:10:44
|
| THANK YOU SO MUCH AGAIN Viskah16 |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-29 : 14:14:45
|
no problem... you're welcome |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
muzzettemm
Posting Yak Master
212 Posts |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
muzzettemm
Posting Yak Master
212 Posts |
Posted - 2008-12-29 : 18:57:22
|
| its an ADP Access 2007 |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
muzzettemm
Posting Yak Master
212 Posts |
Posted - 2008-12-29 : 19:04:05
|
| Nope Microsoft Acces is what I have work with, its an ADP |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-30 : 01:07:37
|
| dont you have any date formatting functions available in it? |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-12-30 : 02:14:31
|
| In ACCESS, it should workformat(date_col,"MMMM")MadhivananFailing to plan is Planning to fail |
 |
|
|
muzzettemm
Posting Yak Master
212 Posts |
Posted - 2008-12-30 : 11:34:06
|
| ok I will try again, I changed the the properties (format) to Medium Date. Must have dont it incorrectly then |
 |
|
|
|