Tag Archives: datetime

Set SelectedDate on ASP.NET Calendar Control to Today

When you want to set the default SelectedDate on an ASP.NET Calendar Control use DateTime.Today not DateTime.Now. calReleaseDate.SelectedDate = DateTime.Today;

Posted in ASP.NET | Tagged , , | 1 Comment

Date Scrubbing Function for SQL Server

When creating a report often the date column provides more detail than we need to see. Here is a handy little UDF that rounds a DATETIME column to either the MINUTE, HOUR, DAY, WEEK or MONTH. DateFirst UDF IF OBJECT_ID(‘dbo.udfDateFirst’) … Continue reading

Posted in SQL | Tagged , | Comments Off

Outer Joins Against A Date Range

This article is written for SQL Server, which supports user-defined functions and OUTER JOINS.  All examples come from the Northwind database which is part of the default installation of SQL Server. In SQL an OUTER JOIN is where you want … Continue reading

Posted in SQL | Tagged , | 2 Comments