Posts

Showing posts from September, 2014

Convert html table into kendo UI grid

You can easily change style of normal HTML table in Kendo Ui Grid.

Just using the script :

<script> $(document).ready(function() { $("#grid").kendoGrid({ height: 550, sortable: true }); }); </script>
Now the script in your table

<table id="grid"> </table>

SQL Get Month First Date & Last Date From given month id & year id

Image
To get the value of month first date & last date int value you can try this:

DECLARE @startOfMonth DATETIME , @MonthID int, @YearId int DECLARE @endOfMonth DATETIME DECLARE @FromDate DateTime,@ToDate DateTime SET @MonthID=2 set @YearId=2014 Select @startOfMonth = CAST(@YearID AS varchar) + '/' + CAST(@MonthID AS varchar) +'/'+ '01' Select @endOfMonth = CAST(@YearID AS varchar) + '/' + CAST(@MonthID AS varchar) + '/'+ CAST(DAY(DATEADD(DD,-1,DATEADD(MM,DATEDIFF(MM,-1,@startOfMonth),0))) AS varchar) Set @FromDate=@startOfMonth Set @ToDate=@endOfMonth SELECT @FromDate 'MonthStartDate',@ToDate 'MonthEndDate'