Skip to content

../notes_to_myself

  • Home
  • Portfolio
  • Sample Page

SQL: Setting DateTime Value to Zero

–using DATEDIFF can set the time portion of your DateTime value to zeros –Handy!

DECLARE @Day DATETIME

SET @Day = DATEADD(DAY, -7, DATEDIFF(Day, 0, GETDATE()))

Author Chrystal SanderPosted on March 23, 2011July 26, 2023Categories SQLTags SQL Server

Post navigation

Previous Previous post: Moving Files In SharePoint
Next Next post: Rapid Application Development (RAD) With The DataGridVIew
  • Get Command Line Help
  • Online C# Sandbox

Android Architecture Arduino ASP.NET AWS Azure Caching Constraints CSharp cybersecurity Design Patterns DotNet Excel git IIS IOT Linq log4net Master Chief MinIO mstest MVC Notes nunit oracle Partitioning PHP PowerShell Query Def Raspberry Pi REST S3 SQL SQL Server Stored Procedures Swagger systables tools Visual Basic Visual Studio WebApi windows WordPress Xml xunit

  • Home
  • Portfolio
  • Sample Page
../notes_to_myself