Learn how to extract the day number from a date using T-SQL with this simple and effective code snippet. Get the day number for any given date in SQL Server.
This T-SQL statement demonstrates how to output the day from a date in ordinal numbers using SQL Server. Learn how to replace `Getdate()` with your date field and format the…
This SQL query demonstrates how to retrieve the ID of the current year from a lookup table by utilizing the current date with GETDATE(), converting it to a year number…
Learn how to retrieve the current financial year in SQL with this simple and effective solution, assuming the fiscal year starts on July 1st and ends on June 30th. Get…
This SQL query demonstrates how to retrieve the current financial year from a lookup table by utilizing the current date, month, year, and cast functions. It returns the selected row…
This article explains how to set a 'datetime' field in an SQL Server database to automatically display the current date and time when the record is created.How to set a…
The article provides a configuration manager collection query that lists inactive computers not seen by active directory for over 90 days using heartbeat discovery method.