Langsung ke konten utama

Postingan

Menampilkan postingan dari 2010

SQLSERVER - Lihat tanggal terakhir dari bulan

Few questions are always popular. They keep on coming up through email, comments or from co-workers. Finding Last Day of Any Month is similar question. I have received it many times and I enjoy answering it as well. I have answered this question twice before here: SQL SERVER – Script/Function to Find Last Day of Month SQL SERVER – Query to Find First and Last Day of Current Month Today, we will see the same solution again. Please use the method you find appropriate to your requirement. Following script demonstrates the script to find last day of previous, current and next month. ----Last Day of Previous Month SELECT DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)) LastDay_PreviousMonth ----Last Day of Current Month SELECT DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())+1,0)) LastDay_CurrentMonth ----Last Day of Next Month SELECT DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())+2,0)) LastDay_NextMonth ResultSet: LastDay_PreviousMonth ———————– 2007-07-31 23:59:59.000 LastDay_Current

Deploy aplikasi ASP.Net MVC pada IIS 6

Aplikasi yang sudah dibuat baik dan dicoba pada built-in server (seperti ASP.Net Development Server milik Ms. Visual Studio 2008) tampak sama sekali tidak ada masalah. Tapi bila anda sudah berhadapan dengan Windows Server 2003 yang menggunakan IIS6, maka hal aneh akan muncul, yaitu halaman yang sudah anda buat tadi tidak ditemukan, browser akan berkata " 404 Not found ". Salah satu solusinya adalah dengan cara membuat wildcard mapping untuk aspnet_isapi.dll "aspnet_isapi.dll" adalah ISAPI filter yang bertugas untuk menangani ASP.Net. Wilcard mapping ini akan membuat IIS6 akan memproses semua permintaan pada server dengan menggunakan ASP.Net tanpa terkecuali!. Caranya adalah: Buka IIS manager, klik kanan aplikasi Anda, pergi ke Properties , kemudian Home Directory tab, kemudian klik Configuration . Setelah Application Configuration muncul maka Buka tab Mappings . Pada sesi Wildcard application maps klik tombol Insert . lalu browse ke directory tempat aspnet_isa