The following T-SQL statement shows how output the name of a day from a date. For example, 16 March 2019 would output Saturday. SELECT DateName( weekday , GETDATE() ) as…
The following T-SQL statement shows how output the day from a date. For example, 16 March 2019 would output 16. SELECT DateName( day, GETDATE() ) as Day_From_Date
The following T-SQL statement shows how output the name of the month from a date. For example, 16 March 2019 would output March. SELECT DateName( month , GETDATE() ) as…
The following T-SQL statement shows how output the day from a date as an ordinal number (st, nd, rd, th). For example, 16 March 2019 would output 16th. How do…
The following SQL shows how to get the current financial year using SQL. This assumes that the financial year for your country is 1 July - 30 June. This SQL…
The following SQL shows how to select a row from a table using the current financial year as the WHERE condition. This is useful if you have a table of…
Senario You have a 'datetime' field in an SQL server database table and need it to automatically use the current date and time when the row is created. Instructions Open…
The following query can be used in an SCCM collection to list all computers which havent rebooted for 7 days. To use you will need to create a new collection…