Jeff Moden

  • Interests: SQL. When Im not having fun with that, then SQL. ;-)

Calculating Work Days

How many times have you wished that there was a parameter for DATEPART to allow you to check for workdays? While many of us may get stuck working 6 or 7 days a week, most of the world revolves on a 5 day work week. Monday through Friday. New author Jeff Moden brings us a method of easily calculating the number of workdays between any two dates.

4.89 (38)

2007-09-07 (first published: )

58,659 reads

Difference between dates with thousands separators

This function calculates the time difference between 2 datetimes and displays the results in the following format:H,HHH,HHH:MM:SSThe return is a 15 character field that is left padded with spaces so that the field becomes right justified.  This makes the colons line up for easy reading.  Commas are automatically added as thousands separators as needed by […]

3 (2)

2004-03-14

393 reads

Blogs

Daily Coping 17 Sep 2021

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

Ethics in Modern Data at Music City Tech 2021

By

  On Sept 16, Christine and I presented our joint presentation on Ethics in Modern Data at...

Slides and Video from Building a Regret-free Foundation for your Data Factory Now Available

By

Last week, Kerry and I delivered a webinar with tips on how to set...

Read the latest Blogs

Forums

SQL Agent job

By Chitown

Can I run extended event session against 1 SQL agent job? I have a...

Need some help with tsql code

By Chitown

I have 4 tables (DevDB, TestDB, StageDB, ProdDB). All those tables have 2 columns...

Save Blob Storage Key in Package

By alex.sqldba

Hi Guys, Is there a way to save the Blob Storage Key into a...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers