Blog Hero Image

SQL Server: Stunden addieren

This article dates back to 2008. Some of the tech in it is history by now; the article stays online as part of my archive.

AI training  ·  Current trainings

SQL Server: Stunden addieren

Heute stolperte ich über folgendes Statement:

Select getdate()+1/24 as date

Ziel des Entwicklers war es, die aktuelle Uhrzeit um eine Stunde zu erhöhen.

Leider evaluiert der SQL Server den Ausdruck “1/24” als 0. Abgesehen von ein wenig verschwendeter Rechenzeit hat man also nichts bewirkt :-)

Zum Ziel gekommen wäre er übrigens mit der addDate Funktion:

select dateadd(hh,1,getdate())

Inconsistent results with AI tools in your team?

I show developer teams how to turn Copilot, Claude, and Codex licenses into a reproducible development process. In one to two days, remote or in person in Bad Breisig, Germany.

To the AI training

I test the AI tools in real projects. You read what matters in five minutes.

What's changed in Claude Code, Copilot, and the other AI tools, and what it means for .NET teams. Plus news on .NET MAUI and the next book edition. No fixed schedule: I write when there's something worth your time. Unsubscribe anytime.

We send via Brevo. By subscribing you agree to your data being processed by Brevo.