The script in this post can be used to obtain an example of each of the different styles that can be output using the CONVERT Transact-SQL statement when converting date/time to a string. I have output the styles including the century, but the script can easily be modified to output examples without.
Tag: Dates & Times
Script that can placed in an Informer calculated column, to return the month and year concatenated into a string, in the format “mm/yyyy”.
The script within this post, outputs a list of each DATETIME and SMALLDATETIME field within a database, along with the minimum and maximum values. Useful to identify tables that have a date created or updated column, and you want to find out if they are still being used.
If you need to find out if a database is being used (or when it was last updated), a useful script contained within this post, will return the maximum date for each and every date/time field within all tables in the current database
Today I worked out how to transpose SQL dates (copied from SQL Server) in Microsoft Word…..
I wanted to produce a list of the MAX of date fields (DateTime, SmallDateTime, TimeStamp) for all tables within all databases held in an instance of SQL Server.
The script below was written for SQL Server 2000, but should be easily customisable for SQL Server 2005