Archive for October, 2006

Creating a Period Date Range Table, with SQL!

18 October 2006

You need a way to lump dated records into periodic chunks, like say for a timesheet system. Say your company’s payroll periods are bi-weekly (that’s every other week). So you need a way to distinguish the dated payroll data into two week timesheets.
Sure you could spend three days figuring out a fancy algorithm, only to [...]

Getting the First and Last day of the month with .NET C#

3 October 2006

Ok so now you know how to get the last day of the month with SQL, but how can you get the first day or the last day of the month given a specific date? That problem is so simple with dot net and csharp! There is a convenience constructor for the DateTime object that [...]